@getlatedev/node 0.2.1373 → 0.2.1375

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.
@@ -1975,7 +1975,7 @@ export type AdTracking = {
1975
1975
  value: string;
1976
1976
  }>;
1977
1977
  /**
1978
- * POST /v1/ads/create on Meta and Google only. Every ad created there carries `zrn=<platform ad id>` on its landing URL so orders and events tied to the landing URL map back to the ad. Meta: `{ key: zrn, value: '{{ad.id}}' }` is appended after your `urlTags`, which are sent unchanged; a `zrn` key you send yourself is kept. Skipped for lead forms, call ads, `existingCreativeId` and app promotion. Google (Display and Search): the ad's `final_url_suffix` is set to `zrn={creative}` only when the ad inherits no suffix from its ad group, campaign or account; when one exists the ad is left untouched (your suffix keeps applying) and attribution uses the click's `gclid`. If the inherited suffix cannot be read or Google rejects the tag, the ad is created untagged. Existing ads are never changed. Set `false` to create the ad with no Zernio tag.
1978
+ * POST /v1/ads/create on Meta and Google only. Opt-in: set `true` and the ad carries `zrn=<platform ad id>` on its landing URL so orders and events tied to the landing URL map back to the ad. Meta: `{ key: zrn, value: '{{ad.id}}' }` is appended after your `urlTags`, which are sent unchanged; a `zrn` key you send yourself is kept. Skipped for lead forms, call ads, `existingCreativeId` and app promotion. Google (Display and Search): the ad's `final_url_suffix` is set to `zrn={creative}` only when the ad inherits no suffix from its ad group, campaign or account; when one exists the ad is left untouched (your suffix keeps applying) and attribution uses the click's `gclid`. If the inherited suffix cannot be read or Google rejects the tag, the ad is created untagged. Existing ads are never changed. Omitted or `false` creates the ad with no Zernio tag.
1979
1979
  */
1980
1980
  zernioTag?: boolean;
1981
1981
  };
@@ -2718,7 +2718,7 @@ export type ApiKey = {
2718
2718
  /**
2719
2719
  * Resource groups this key can NOT access (opt-out denylist). Absent or empty means legacy full access. A key with any group disabled is a restricted key (zrk_ prefix) and can never manage API keys, invites, or member identity. Each operation's group is published as x-resource-group. With 'messages' disabled, the key cannot read or send direct messages through any API surface, and it cannot create or edit a webhook subscription broader than itself: it cannot subscribe to, test-fire, redeliver, or read delivery logs for message events. Subscriptions created earlier, from the dashboard, or with a full-access key keep delivering whatever their own `disabledResourceGroups` allows, so restricting an existing integration end to end means restricting the subscription too. OAuth connector tokens (AI assistants and MCP clients) resolve against the same registry, but their groups are not settable yet: treat an authorized connector as full access.
2720
2720
  */
2721
- disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files')>;
2721
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files')>;
2722
2722
  /**
2723
2723
  * The team member who created this key. For the team owner's listing this can be any team member; for a non-owner it is always themselves, since a non-owner only ever sees their own keys.
2724
2724
  */
@@ -3822,6 +3822,21 @@ export type transcriptionLanguage = 'auto' | 'en' | 'es';
3822
3822
 
3823
3823
  export type endReason = 'hangup' | 'no_answer' | 'rejected' | 'error';
3824
3824
 
3825
+ export type CampaignAdjustment = {
3826
+ id: string;
3827
+ kind: 'adjustment';
3828
+ participantId: string;
3829
+ /**
3830
+ * Positive credits the participant, negative claws back.
3831
+ */
3832
+ amountCents: number;
3833
+ cause: string;
3834
+ actor: string;
3835
+ createdAt: string;
3836
+ };
3837
+
3838
+ export type kind2 = 'adjustment';
3839
+
3825
3840
  export type CampaignAnalyticsResponse = {
3826
3841
  /**
3827
3842
  * Meta only. Present and true while historical data is being backfilled.
@@ -3997,6 +4012,315 @@ export type CampaignBidding = {
3997
4012
  */
3998
4013
  export type channel2 = 'SEARCH' | 'DISPLAY';
3999
4014
 
4015
+ export type CampaignLedgerEntry = {
4016
+ id: string;
4017
+ kind: 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
4018
+ /**
4019
+ * Always positive; direction is given by debit and credit.
4020
+ */
4021
+ amountCents: number;
4022
+ debit: LedgerAccountSide;
4023
+ credit: LedgerAccountSide;
4024
+ holdUntil: (string) | null;
4025
+ releasedByEntryId: (string) | null;
4026
+ reversesEntryId: (string) | null;
4027
+ referenceType: (string) | null;
4028
+ referenceId: (string) | null;
4029
+ cause: string;
4030
+ /**
4031
+ * The payout reference recorded with a settlement (your transfer or invoice id).
4032
+ */
4033
+ externalReference: (string) | null;
4034
+ actor: string;
4035
+ createdAt: string;
4036
+ };
4037
+
4038
+ export type kind3 = 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
4039
+
4040
+ export type CampaignParticipant = {
4041
+ id: string;
4042
+ campaignId: string;
4043
+ creator: {
4044
+ id: string;
4045
+ displayName: string;
4046
+ email: (string) | null;
4047
+ };
4048
+ status: 'invited' | 'active' | 'suspended' | 'removed';
4049
+ joinedAt: (string) | null;
4050
+ /**
4051
+ * Social accounts the creator connected, verified once Zernio confirmed the creator owns them.
4052
+ */
4053
+ accounts: Array<{
4054
+ accountId: string;
4055
+ verifiedAt: (string) | null;
4056
+ /**
4057
+ * Null when the account is no longer active on the creator profile.
4058
+ */
4059
+ platform: (string) | null;
4060
+ /**
4061
+ * The handle on the platform; null when the account is no longer active.
4062
+ */
4063
+ username: (string) | null;
4064
+ }>;
4065
+ balances: CampaignParticipantBalances;
4066
+ flags: Array<{
4067
+ code: 'linked_accounts' | 'cross_operator';
4068
+ detail: string;
4069
+ raisedAt: string;
4070
+ }>;
4071
+ submissionCounts: CampaignSubmissionCounts;
4072
+ /**
4073
+ * How far the creator got with Stripe payout setup. Only `ready` creators can be paid through the Zernio treasury.
4074
+ */
4075
+ payout: {
4076
+ /**
4077
+ * `not_started`: no payout account yet. `onboarding`: setup started or under review. `ready`: payouts enabled. `restricted`: Stripe needs more information before paying out.
4078
+ */
4079
+ status: 'not_started' | 'onboarding' | 'ready' | 'restricted';
4080
+ };
4081
+ };
4082
+
4083
+ export type status14 = 'invited' | 'active' | 'suspended' | 'removed';
4084
+
4085
+ /**
4086
+ * USD cents in each state. accruing: earned on posts not yet approved. owed: approved and on hold. payable: past the hold, ready to pay. settling: a treasury payout in progress, no longer payable and not reversible by a reject. settled: paid out.
4087
+ */
4088
+ export type CampaignParticipantBalances = {
4089
+ accruing: number;
4090
+ owed: number;
4091
+ payable: number;
4092
+ settling: number;
4093
+ settled: number;
4094
+ };
4095
+
4096
+ export type CampaignPayable = {
4097
+ participantId: string;
4098
+ creator: {
4099
+ id: string;
4100
+ displayName: string;
4101
+ };
4102
+ /**
4103
+ * The participant's whole payable balance.
4104
+ */
4105
+ payableCents: number;
4106
+ /**
4107
+ * Ids of the newest ledger entries into payable that add up to the balance (up to 200).
4108
+ */
4109
+ entries: Array<(string)>;
4110
+ };
4111
+
4112
+ export type CampaignReport = {
4113
+ spend: {
4114
+ budgetCents: number;
4115
+ consumedCents: number;
4116
+ settledCents: number;
4117
+ };
4118
+ /**
4119
+ * Summed over submissions that are not rejected or withdrawn.
4120
+ */
4121
+ views: {
4122
+ /**
4123
+ * Views that count toward earnings.
4124
+ */
4125
+ eligible: number;
4126
+ /**
4127
+ * Latest view counts.
4128
+ */
4129
+ total: number;
4130
+ };
4131
+ submissions: CampaignSubmissionCounts;
4132
+ /**
4133
+ * Top 10 participants by payable, settling and settled cents.
4134
+ */
4135
+ participants: Array<{
4136
+ participantId: string;
4137
+ creator: {
4138
+ id: string;
4139
+ displayName: string;
4140
+ };
4141
+ payableCents: number;
4142
+ /**
4143
+ * A treasury payout in progress.
4144
+ */
4145
+ settlingCents: number;
4146
+ settledCents: number;
4147
+ }>;
4148
+ /**
4149
+ * Authenticity score histogram in ten buckets (0-9 through 90-100).
4150
+ */
4151
+ authenticity: Array<{
4152
+ from: number;
4153
+ to: number;
4154
+ count: number;
4155
+ }>;
4156
+ };
4157
+
4158
+ export type CampaignSettlement = {
4159
+ /**
4160
+ * The ledger settlement entry.
4161
+ */
4162
+ entryId: string;
4163
+ participantId: string;
4164
+ amountCents: number;
4165
+ externalReference: (string) | null;
4166
+ /**
4167
+ * Payable balance left after this settlement.
4168
+ */
4169
+ payableCents: number;
4170
+ settledAt: string;
4171
+ /**
4172
+ * Treasury settlement only: the Zernio transfer that moved the money. The creator receives amountCents in full.
4173
+ */
4174
+ transferId?: string;
4175
+ /**
4176
+ * Treasury settlement only: the transfer fee, added on top of amountCents.
4177
+ */
4178
+ feeCents?: number;
4179
+ /**
4180
+ * Treasury settlement only: debited from your balance, amountCents plus feeCents.
4181
+ */
4182
+ totalCents?: number;
4183
+ };
4184
+
4185
+ export type CampaignSubmission = {
4186
+ id: string;
4187
+ campaignId: string;
4188
+ participantId: string;
4189
+ creatorId: string;
4190
+ /**
4191
+ * The creator account the post was published from.
4192
+ */
4193
+ accountId: string;
4194
+ platform: 'tiktok' | 'instagram' | 'youtube';
4195
+ platformPostId: string;
4196
+ platformPostUrl: (string) | null;
4197
+ /**
4198
+ * The tracked external post (see /v1/external-posts).
4199
+ */
4200
+ externalPostId: (string) | null;
4201
+ trackingWindowId: (string) | null;
4202
+ mediaHash: (string) | null;
4203
+ submittedAt: string;
4204
+ postPublishedAt: (string) | null;
4205
+ status: 'received' | 'tracking' | 'pending_review' | 'approved' | 'rejected' | 'expired' | 'withdrawn';
4206
+ rejectReason: (string) | null;
4207
+ /**
4208
+ * How many times the post was reopened after a reject. 0 until the first reopen.
4209
+ */
4210
+ reviewRound: number;
4211
+ /**
4212
+ * User id of the reviewer.
4213
+ */
4214
+ reviewedBy: (string) | null;
4215
+ reviewedAt: (string) | null;
4216
+ /**
4217
+ * Views when the post was submitted; they never count toward earnings.
4218
+ */
4219
+ viewsAtSubmission: (number) | null;
4220
+ /**
4221
+ * Latest view count read for the post, frozen at the tracking window end.
4222
+ */
4223
+ viewsLatest: (number) | null;
4224
+ /**
4225
+ * Views gained after submission that count toward earnings, read at the tracking window end at the latest: once the window completes or is cancelled, the last read at or before its end is final and this value stops moving.
4226
+ */
4227
+ viewsEligible: (number) | null;
4228
+ lastAccruedViews: number;
4229
+ accruedCents: number;
4230
+ approvedCents: number;
4231
+ authenticityScore: (number) | null;
4232
+ authenticityConfidence: (number) | null;
4233
+ flags: Array<CampaignSubmissionFlag>;
4234
+ createdAt: string;
4235
+ updatedAt: string;
4236
+ creator: {
4237
+ id: string;
4238
+ displayName: string;
4239
+ };
4240
+ /**
4241
+ * 0 to 100, where 100 means the view pattern looks organic. Null until the post is scored.
4242
+ */
4243
+ authenticity: {
4244
+ score: number;
4245
+ confidence: (number) | null;
4246
+ reasons: Array<unknown>;
4247
+ } | null;
4248
+ /**
4249
+ * approvedCents once approved, otherwise accruedCents.
4250
+ */
4251
+ earnedCents: number;
4252
+ /**
4253
+ * Approved cents whose hold is over, so payable or already paid out. 0 unless approved.
4254
+ */
4255
+ releasedCents: number;
4256
+ /**
4257
+ * What rejecting this post could not take back now: releasedCents beyond the creator's payable balance. It stays paid; the dashboard warns before such a reject.
4258
+ */
4259
+ paidOutCents: number;
4260
+ /**
4261
+ * The tracking window that samples the post.
4262
+ */
4263
+ window: {
4264
+ id: string;
4265
+ endsAt: string;
4266
+ status: string;
4267
+ } | null;
4268
+ /**
4269
+ * The post itself, as the review drawer shows it. Thumbnail and caption are null until the post has been synced.
4270
+ */
4271
+ post: {
4272
+ thumbnailUrl: (string) | null;
4273
+ caption: (string) | null;
4274
+ /**
4275
+ * The @handle of the connected account that published the post, without the @.
4276
+ */
4277
+ accountHandle: (string) | null;
4278
+ /**
4279
+ * When the post went live; the submission time if that is not known.
4280
+ */
4281
+ publishedAt: string;
4282
+ };
4283
+ };
4284
+
4285
+ export type platform4 = 'tiktok' | 'instagram' | 'youtube';
4286
+
4287
+ export type status15 = 'received' | 'tracking' | 'pending_review' | 'approved' | 'rejected' | 'expired' | 'withdrawn';
4288
+
4289
+ /**
4290
+ * Number of submissions in each status.
4291
+ */
4292
+ export type CampaignSubmissionCounts = {
4293
+ received: number;
4294
+ tracking: number;
4295
+ pending_review: number;
4296
+ approved: number;
4297
+ rejected: number;
4298
+ expired: number;
4299
+ withdrawn: number;
4300
+ };
4301
+
4302
+ export type CampaignSubmissionDetail = CampaignSubmission & {
4303
+ /**
4304
+ * Counters per sync, newest first, up to 500.
4305
+ */
4306
+ samples: Array<{
4307
+ syncedAt: string;
4308
+ views: number;
4309
+ likes: number;
4310
+ comments: number;
4311
+ shares: number;
4312
+ saves: number;
4313
+ }>;
4314
+ };
4315
+
4316
+ export type CampaignSubmissionFlag = {
4317
+ code: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity';
4318
+ detail: string;
4319
+ raisedAt: string;
4320
+ };
4321
+
4322
+ export type code = 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity';
4323
+
4000
4324
  /**
4001
4325
  * Actions taken on the matched comment itself (comment trigger only; ignored on the
4002
4326
  * story-reply and DM doors). They never block or fail the DM: when one cannot run,
@@ -4201,7 +4525,7 @@ export type source = 'comment' | 'live_comment' | 'story_reply' | 'story_mention
4201
4525
  /**
4202
4526
  * DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap. 'skipped' also covers repeatPolicy, cooldown and dedupeSameTextHours suppressions, with the reason in error.
4203
4527
  */
4204
- export type status14 = 'pending' | 'sent' | 'failed' | 'skipped' | 'gated';
4528
+ export type status16 = 'pending' | 'sent' | 'failed' | 'skipped' | 'gated';
4205
4529
 
4206
4530
  /**
4207
4531
  * How the audience rule resolved. Null on automations without one.
@@ -4438,7 +4762,7 @@ export type CommerceCollection = {
4438
4762
  } | null;
4439
4763
  };
4440
4764
 
4441
- export type platform4 = 'shopify' | 'woocommerce';
4765
+ export type platform5 = 'shopify' | 'woocommerce';
4442
4766
 
4443
4767
  export type sortOrder = 'manual' | 'best_selling' | 'alpha_asc' | 'alpha_desc' | 'price_asc' | 'price_desc' | 'created' | 'created_desc' | 'most_relevant';
4444
4768
 
@@ -4489,13 +4813,13 @@ export type CommerceDiscount = {
4489
4813
  } | null;
4490
4814
  };
4491
4815
 
4492
- export type platform5 = 'shopify';
4816
+ export type platform6 = 'shopify';
4493
4817
 
4494
4818
  export type method = 'code' | 'automatic';
4495
4819
 
4496
4820
  export type type7 = 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app';
4497
4821
 
4498
- export type status15 = 'active' | 'scheduled' | 'expired';
4822
+ export type status17 = 'active' | 'scheduled' | 'expired';
4499
4823
 
4500
4824
  export type CommerceImage = {
4501
4825
  /**
@@ -4550,7 +4874,7 @@ export type CommerceMarket = {
4550
4874
  type?: string;
4551
4875
  };
4552
4876
 
4553
- export type status16 = 'active' | 'draft';
4877
+ export type status18 = 'active' | 'draft';
4554
4878
 
4555
4879
  export type CommerceMenu = {
4556
4880
  id?: string;
@@ -5065,7 +5389,7 @@ export type ConnectHandoff = {
5065
5389
  } | null;
5066
5390
  };
5067
5391
 
5068
- export type status17 = 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
5392
+ export type status19 = 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
5069
5393
 
5070
5394
  /**
5071
5395
  * Only with `handoff=true`: the link to show as a QR code.
@@ -5286,7 +5610,7 @@ export type ConversionDestination = {
5286
5610
  * For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
5287
5611
  *
5288
5612
  */
5289
- export type status18 = 'active' | 'inactive';
5613
+ export type status20 = 'active' | 'inactive';
5290
5614
 
5291
5615
  /**
5292
5616
  * A single conversion event to relay to the ad platform. All PII fields
@@ -5537,6 +5861,34 @@ export type CreateCalendarEventRequest = {
5537
5861
  calendarId?: string;
5538
5862
  } & CalendarEventFields;
5539
5863
 
5864
+ export type CreateCreatorCampaignRequest = {
5865
+ /**
5866
+ * Profile the campaign lives in. Creator accounts connect into the same workspace.
5867
+ */
5868
+ profileId: string;
5869
+ name: string;
5870
+ brandName: string;
5871
+ economics: CreatorCampaignEconomics;
5872
+ /**
5873
+ * Omitted, the campaign starts with authenticityThreshold 40 and no other caps.
5874
+ */
5875
+ caps?: (CreatorCampaignCaps);
5876
+ /**
5877
+ * Platforms creators may post on. At least one is needed to activate.
5878
+ */
5879
+ platforms?: Array<('tiktok' | 'instagram' | 'youtube')>;
5880
+ contentRules?: (string) | null;
5881
+ startsAt?: (string) | null;
5882
+ endsAt?: (string) | null;
5883
+ trackingDays?: number;
5884
+ holdDays?: number;
5885
+ maxPostAgeMinutes?: number;
5886
+ settlement?: 'none' | 'external' | 'treasury';
5887
+ branding?: (CreatorCampaignBranding | null);
5888
+ };
5889
+
5890
+ export type settlement = 'none' | 'external' | 'treasury';
5891
+
5540
5892
  export type CreatedGoogleAdAccount = {
5541
5893
  platform: 'google';
5542
5894
  /**
@@ -5698,7 +6050,323 @@ export type CreateMetaAdAccountRequest = {
5698
6050
  /**
5699
6051
  * Optional. Omit it or send meta for a Meta ad account.
5700
6052
  */
5701
- export type platform6 = 'meta';
6053
+ export type platform7 = 'meta';
6054
+
6055
+ export type CreatorCampaign = {
6056
+ id: string;
6057
+ /**
6058
+ * The workspace billing owner the campaign belongs to.
6059
+ */
6060
+ userId: string;
6061
+ /**
6062
+ * The profile that scopes the campaign: API keys, teammates and webhooks scoped to it reach the campaign.
6063
+ */
6064
+ profileId: string;
6065
+ kind: string;
6066
+ name: string;
6067
+ brandName: string;
6068
+ /**
6069
+ * draft until activated; active accepts submissions and accrues; paused stops new submissions; closed is final.
6070
+ */
6071
+ status: 'draft' | 'active' | 'paused' | 'closed';
6072
+ /**
6073
+ * Same as economics.type.
6074
+ */
6075
+ type: 'cpm' | 'per_post' | 'pool';
6076
+ currency: string;
6077
+ platforms: Array<('tiktok' | 'instagram' | 'youtube')>;
6078
+ /**
6079
+ * Free-text rules shown to creators on the join page.
6080
+ */
6081
+ contentRules: (string) | null;
6082
+ startsAt: (string) | null;
6083
+ /**
6084
+ * No new submissions after this time; the campaign closes once every tracking window had its final read.
6085
+ */
6086
+ endsAt: (string) | null;
6087
+ /**
6088
+ * How long each submitted post is tracked.
6089
+ */
6090
+ trackingDays: number;
6091
+ /**
6092
+ * Days approved earnings are held before they become payable.
6093
+ */
6094
+ holdDays: number;
6095
+ /**
6096
+ * A post older than this when submitted is refused.
6097
+ */
6098
+ maxPostAgeMinutes: number;
6099
+ /**
6100
+ * none: settle records a payout made elsewhere. external: you pay from your own rails on campaign_payout.payable and settle with your reference. treasury: settle moves the money from your Zernio balance to the creator's Stripe account, and the creator sets up payouts from their campaign page.
6101
+ */
6102
+ settlement: 'none' | 'external' | 'treasury';
6103
+ economics: CreatorCampaignEconomics;
6104
+ caps: CreatorCampaignCaps;
6105
+ branding: (CreatorCampaignBranding | null);
6106
+ budgetExhaustedAt: (string) | null;
6107
+ closedAt: (string) | null;
6108
+ /**
6109
+ * Internal watermark of the payable scan.
6110
+ */
6111
+ payableScannedAt: (string) | null;
6112
+ createdAt: string;
6113
+ updatedAt: string;
6114
+ /**
6115
+ * True once an open invite link was created. The link itself is returned only when it is created.
6116
+ */
6117
+ hasOpenInvite: boolean;
6118
+ /**
6119
+ * Budget used so far: earnings accrued, approved or adjusted against the campaign.
6120
+ */
6121
+ consumedCents: number;
6122
+ participantCount: number;
6123
+ submissionCounts: CampaignSubmissionCounts;
6124
+ };
6125
+
6126
+ /**
6127
+ * draft until activated; active accepts submissions and accrues; paused stops new submissions; closed is final.
6128
+ */
6129
+ export type status21 = 'draft' | 'active' | 'paused' | 'closed';
6130
+
6131
+ /**
6132
+ * Same as economics.type.
6133
+ */
6134
+ export type type9 = 'cpm' | 'per_post' | 'pool';
6135
+
6136
+ /**
6137
+ * Branding of the hosted join page, in the connect-link branding shape.
6138
+ */
6139
+ export type CreatorCampaignBranding = {
6140
+ brandName?: string;
6141
+ primaryColor?: string;
6142
+ logoUrl?: string;
6143
+ theme?: {
6144
+ [key: string]: unknown;
6145
+ };
6146
+ };
6147
+
6148
+ export type CreatorCampaignCaps = {
6149
+ /**
6150
+ * Invites and joins past this count answer 403.
6151
+ */
6152
+ maxParticipants?: number;
6153
+ /**
6154
+ * Posts one participant can submit to this campaign per UTC day, counting every submission whatever its status. The next submit that day answers 409 invalid_resource_state.
6155
+ */
6156
+ maxSubmissionsPerParticipantPerDay?: number;
6157
+ /**
6158
+ * Accounts a participant can use in this campaign. Connecting a new account past it answers 400; only the first accounts connected, up to this count, can submit posts.
6159
+ */
6160
+ maxAccountsPerParticipant?: number;
6161
+ /**
6162
+ * A submission whose authenticity score falls below this is flagged `low_authenticity`. It is never rejected automatically. Defaults to 40 on create.
6163
+ */
6164
+ authenticityThreshold: number;
6165
+ };
6166
+
6167
+ /**
6168
+ * How the campaign pays, picked by `type`. Amounts are USD cents. Every type carries
6169
+ * `budgetCents`, the most the campaign can pay out in total; once earnings reach it the
6170
+ * campaign stops accruing and `creator_campaign.budget_exhausted` fires.
6171
+ * - `cpm`: `ratePer1kCents` per 1,000 eligible views, earned from `minViewsToEarn` views on, capped per post by `maxPayoutPerClipCents`.
6172
+ * - `per_post`: `perApprovedPostCents` for each approved post, at most `maxPostsPerParticipant` per participant.
6173
+ * - `pool`: `budgetCents` is split at close among approved posts by eligible views; a post needs `minViewsToQualify` views to share.
6174
+ *
6175
+ */
6176
+ export type CreatorCampaignEconomics = CreatorCampaignEconomicsCpm | CreatorCampaignEconomicsPerPost | CreatorCampaignEconomicsPool;
6177
+
6178
+ export type CreatorCampaignEconomicsCpm = {
6179
+ type: 'cpm';
6180
+ ratePer1kCents: number;
6181
+ minViewsToEarn: number;
6182
+ maxPayoutPerClipCents?: number;
6183
+ budgetCents: number;
6184
+ };
6185
+
6186
+ export type CreatorCampaignEconomicsPerPost = {
6187
+ type: 'per_post';
6188
+ perApprovedPostCents: number;
6189
+ maxPostsPerParticipant?: number;
6190
+ budgetCents: number;
6191
+ };
6192
+
6193
+ export type CreatorCampaignEconomicsPool = {
6194
+ type: 'pool';
6195
+ budgetCents: number;
6196
+ minViewsToQualify: number;
6197
+ };
6198
+
6199
+ /**
6200
+ * The campaign as a creator sees it: terms, never the budget.
6201
+ */
6202
+ export type CreatorPortalCampaign = {
6203
+ /**
6204
+ * The campaign id, as in a link-recovery URL.
6205
+ */
6206
+ id: string;
6207
+ name: string;
6208
+ brandName: string;
6209
+ logoUrl: (string) | null;
6210
+ /**
6211
+ * Same keys as the `welcomeTheme` parameter of `GET /v1/connect/{platform}`.
6212
+ */
6213
+ theme: {
6214
+ [key: string]: unknown;
6215
+ } | null;
6216
+ status: 'draft' | 'active' | 'paused' | 'closed';
6217
+ platforms: Array<(string)>;
6218
+ contentRules: (string) | null;
6219
+ startsAt: (string) | null;
6220
+ endsAt: (string) | null;
6221
+ currency: string;
6222
+ economics: CreatorPortalEconomics;
6223
+ /**
6224
+ * A post must be submitted within this many minutes of publishing.
6225
+ */
6226
+ maxPostAgeMinutes: number;
6227
+ /**
6228
+ * Days approved earnings stay owed before they become payable.
6229
+ */
6230
+ holdDays: number;
6231
+ /**
6232
+ * Days each submitted post is tracked for views.
6233
+ */
6234
+ trackingDays: number;
6235
+ };
6236
+
6237
+ /**
6238
+ * How the campaign pays, without its budget. Amounts in cents. A pool campaign shows the pool size as `poolCents`.
6239
+ */
6240
+ export type CreatorPortalEconomics = {
6241
+ type: 'cpm';
6242
+ ratePer1kCents: number;
6243
+ minViewsToEarn: number;
6244
+ maxPayoutPerClipCents?: number;
6245
+ } | {
6246
+ type: 'per_post';
6247
+ perApprovedPostCents: number;
6248
+ maxPostsPerParticipant?: number;
6249
+ } | {
6250
+ type: 'pool';
6251
+ poolCents: number;
6252
+ minViewsToQualify: number;
6253
+ };
6254
+
6255
+ export type type10 = 'cpm';
6256
+
6257
+ export type CreatorPortalInvite = {
6258
+ kind: 'invite';
6259
+ campaign: CreatorPortalCampaign;
6260
+ };
6261
+
6262
+ export type kind4 = 'invite';
6263
+
6264
+ export type CreatorPortalParticipant = {
6265
+ kind: 'participant';
6266
+ campaign: CreatorPortalCampaign;
6267
+ participant: {
6268
+ displayName: string;
6269
+ status: 'invited' | 'active' | 'suspended' | 'removed';
6270
+ joinedAt: (string) | null;
6271
+ };
6272
+ /**
6273
+ * Verified accounts on the campaign's platforms.
6274
+ */
6275
+ accounts: Array<{
6276
+ platform: string;
6277
+ username: string;
6278
+ displayName: (string) | null;
6279
+ avatarUrl: (string) | null;
6280
+ }>;
6281
+ /**
6282
+ * The latest 100 submissions.
6283
+ */
6284
+ submissions: Array<CreatorPortalSubmission>;
6285
+ earnings: {
6286
+ /**
6287
+ * Earned, not approved yet.
6288
+ */
6289
+ accruingCents: number;
6290
+ /**
6291
+ * Approved, on hold.
6292
+ */
6293
+ owedCents: number;
6294
+ payableCents: number;
6295
+ /**
6296
+ * A payout in flight.
6297
+ */
6298
+ payingCents: number;
6299
+ paidCents: number;
6300
+ /**
6301
+ * When the next held amount becomes payable.
6302
+ */
6303
+ nextReleaseAt: (string) | null;
6304
+ };
6305
+ payouts: CreatorPortalPayoutSetup;
6306
+ };
6307
+
6308
+ export type kind5 = 'participant';
6309
+
6310
+ export type CreatorPortalPayoutEntry = {
6311
+ id: string;
6312
+ kind: 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
6313
+ amountCents: number;
6314
+ /**
6315
+ * The participant bucket the money left; null when it came from outside the participant.
6316
+ */
6317
+ fromBucket: (string) | null;
6318
+ /**
6319
+ * The participant bucket the money entered; null when it left the participant.
6320
+ */
6321
+ toBucket: (string) | null;
6322
+ holdUntil: (string) | null;
6323
+ createdAt: string;
6324
+ };
6325
+
6326
+ export type CreatorPortalPayoutSetup = {
6327
+ /**
6328
+ * How the campaign pays: treasury means through Zernio, so the creator onboards for payouts.
6329
+ */
6330
+ mode: 'none' | 'external' | 'treasury';
6331
+ status: 'not_started' | 'pending' | 'enabled' | 'not_applicable';
6332
+ country: (string) | null;
6333
+ /**
6334
+ * Treasury payouts sent to the creator.
6335
+ */
6336
+ transfers: Array<{
6337
+ id: string;
6338
+ amountCents: number;
6339
+ createdAt: string;
6340
+ }>;
6341
+ };
6342
+
6343
+ /**
6344
+ * How the campaign pays: treasury means through Zernio, so the creator onboards for payouts.
6345
+ */
6346
+ export type mode2 = 'none' | 'external' | 'treasury';
6347
+
6348
+ export type status22 = 'not_started' | 'pending' | 'enabled' | 'not_applicable';
6349
+
6350
+ export type CreatorPortalSubmission = {
6351
+ id: string;
6352
+ platform: string;
6353
+ postId: string;
6354
+ url: (string) | null;
6355
+ status: 'received' | 'tracking' | 'pending_review' | 'approved' | 'rejected' | 'expired' | 'withdrawn';
6356
+ submittedAt: string;
6357
+ publishedAt: (string) | null;
6358
+ /**
6359
+ * Latest view count read for the post.
6360
+ */
6361
+ views: number;
6362
+ earnedCents: number;
6363
+ rejectReason: (string) | null;
6364
+ /**
6365
+ * Creator-safe flags only. Every other review flag shows as `under_review`.
6366
+ */
6367
+ flags: Array<('unreachable' | 'post_deleted' | 'duplicate_post' | 'under_review')>;
6368
+ trackingEndsAt: (string) | null;
6369
+ };
5702
6370
 
5703
6371
  /**
5704
6372
  * In addition to the `required` list, the request must use
@@ -6431,7 +7099,7 @@ export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS'
6431
7099
  * `adSetId`, the new ads themselves.
6432
7100
  *
6433
7101
  */
6434
- export type status19 = 'ACTIVE' | 'PAUSED';
7102
+ export type status23 = 'ACTIVE' | 'PAUSED';
6435
7103
 
6436
7104
  /**
6437
7105
  * Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
@@ -6831,7 +7499,7 @@ export type privacy_level = 2;
6831
7499
  /**
6832
7500
  * 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
6833
7501
  */
6834
- export type status20 = 1 | 2 | 3 | 4;
7502
+ export type status24 = 1 | 2 | 3 | 4;
6835
7503
 
6836
7504
  /**
6837
7505
  * 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
@@ -6865,7 +7533,7 @@ export type DmButton = {
6865
7533
  phone?: string;
6866
7534
  };
6867
7535
 
6868
- export type type9 = 'url' | 'postback' | 'phone';
7536
+ export type type11 = 'url' | 'postback' | 'phone';
6869
7537
 
6870
7538
  export type EmailAddress = {
6871
7539
  email: string;
@@ -7117,7 +7785,7 @@ export type ErrorResponse = {
7117
7785
  /**
7118
7786
  * Error class for programmatic handling.
7119
7787
  */
7120
- export type type10 = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found' | 'rate_limit_error' | 'platform_error' | 'api_error';
7788
+ export type type12 = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found' | 'rate_limit_error' | 'platform_error' | 'api_error';
7121
7789
 
7122
7790
  /**
7123
7791
  * Meta ad create failures only. The step that failed: `media` (image/video download or upload), `campaign`, `adset`, `creative`, `ad` (the ad POST itself, where Meta's code 31 / 3858385 hold and 100 / 1359188 payment rejections land), `activation` (switching the created objects on; no longer returned, since a refused switch to ACTIVE now answers 201 with an `activation_failed:` warning and the objects kept PAUSED), or `other` (a read or check before any write).
@@ -7176,7 +7844,7 @@ export type ExternalPostMediaItem = {
7176
7844
  unavailableReason?: 'platform_withheld';
7177
7845
  };
7178
7846
 
7179
- export type type11 = 'image' | 'video';
7847
+ export type type13 = 'image' | 'video';
7180
7848
 
7181
7849
  /**
7182
7850
  * unavailable means the media file could not be retrieved (url is null or, for LinkedIn videos, a cover image standing in for the file). available or absent means the file is available at url (older synced items omit the field).
@@ -7609,7 +8277,7 @@ export type FeedbackReceipt = {
7609
8277
  duplicate?: boolean;
7610
8278
  };
7611
8279
 
7612
- export type status21 = 'received';
8280
+ export type status25 = 'received';
7613
8281
 
7614
8282
  /**
7615
8283
  * A file or folder in a connected Google Drive or OneDrive. Ids are the provider's own.
@@ -7643,7 +8311,7 @@ export type FileItem = {
7643
8311
  trashed: boolean;
7644
8312
  };
7645
8313
 
7646
- export type kind2 = 'file' | 'folder';
8314
+ export type kind6 = 'file' | 'folder';
7647
8315
 
7648
8316
  export type FilePickerSession = {
7649
8317
  /**
@@ -7794,7 +8462,7 @@ export type GoogleAdLabel = {
7794
8462
  description?: (string) | null;
7795
8463
  };
7796
8464
 
7797
- export type status22 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
8465
+ export type status26 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
7798
8466
 
7799
8467
  /**
7800
8468
  * At least one id across the four target lists. Up to 1000 ids per list.
@@ -7897,7 +8565,7 @@ export type GoogleAdsManagerLink = {
7897
8565
  /**
7898
8566
  * Status the link has after this call.
7899
8567
  */
7900
- export type status23 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
8568
+ export type status27 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
7901
8569
 
7902
8570
  export type GoogleAdsUserAccessInvitation = {
7903
8571
  invitationId?: string;
@@ -7912,7 +8580,7 @@ export type GoogleAdsUserAccessInvitation = {
7912
8580
 
7913
8581
  export type accessRole = 'ADMIN' | 'STANDARD' | 'READ_ONLY' | 'EMAIL_ONLY' | 'UNKNOWN';
7914
8582
 
7915
- export type status24 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
8583
+ export type status28 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
7916
8584
 
7917
8585
  export type GoogleAdsUserAccessInvitationResult = {
7918
8586
  customerId?: string;
@@ -7936,7 +8604,7 @@ export type GoogleAdsUserAccessInvitationResult = {
7936
8604
  /**
7937
8605
  * PENDING once the email is sent; PENDING_APPROVAL while Google waits for a second admin's multi-party approval.
7938
8606
  */
7939
- export type status25 = 'PENDING' | 'PENDING_APPROVAL';
8607
+ export type status29 = 'PENDING' | 'PENDING_APPROVAL';
7940
8608
 
7941
8609
  export type GoogleAdsUserInvitationApproval = {
7942
8610
  /**
@@ -8213,7 +8881,7 @@ export type topicType = 'STANDARD' | 'EVENT' | 'OFFER';
8213
8881
  /**
8214
8882
  * Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
8215
8883
  */
8216
- export type type12 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
8884
+ export type type14 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
8217
8885
 
8218
8886
  /**
8219
8887
  * A Google Business Profile review, as returned by every gmb-reviews read endpoint.
@@ -8531,7 +9199,7 @@ export type GoogleListingGroupFilterNode = {
8531
9199
  } | null;
8532
9200
  };
8533
9201
 
8534
- export type type13 = 'SUBDIVISION' | 'UNIT_INCLUDED' | 'UNIT_EXCLUDED';
9202
+ export type type15 = 'SUBDIVISION' | 'UNIT_INCLUDED' | 'UNIT_EXCLUDED';
8535
9203
 
8536
9204
  export type GoogleListingGroupNode = {
8537
9205
  dimension: GoogleListingGroupDimension;
@@ -8786,7 +9454,7 @@ export type GoogleRecommendationResult = {
8786
9454
  error?: string;
8787
9455
  };
8788
9456
 
8789
- export type status26 = 'applied' | 'dismissed' | 'failed';
9457
+ export type status30 = 'applied' | 'dismissed' | 'failed';
8790
9458
 
8791
9459
  export type GoogleRsaDescription = {
8792
9460
  text: string;
@@ -8877,7 +9545,7 @@ export type HubSpotSettings = {
8877
9545
  reportDeals: boolean;
8878
9546
  };
8879
9547
 
8880
- export type platform7 = 'hubspot';
9548
+ export type platform8 = 'hubspot';
8881
9549
 
8882
9550
  export type ImessageAudienceContact = {
8883
9551
  conversationId?: string;
@@ -8925,7 +9593,7 @@ export type ImessageSandboxContact = {
8925
9593
  createdAt?: string;
8926
9594
  };
8927
9595
 
8928
- export type status27 = 'pending' | 'active';
9596
+ export type status31 = 'pending' | 'active';
8929
9597
 
8930
9598
  /**
8931
9599
  * An iMessage sender registered as an account on a profile.
@@ -8957,7 +9625,7 @@ export type ImessageSender = {
8957
9625
  isActive?: boolean;
8958
9626
  };
8959
9627
 
8960
- export type platform8 = 'imessage';
9628
+ export type platform9 = 'imessage';
8961
9629
 
8962
9630
  /**
8963
9631
  * A provisioned iMessage sender order and its lifecycle. Activation is asynchronous: poll GET /v1/imessage/senders/{senderId} or subscribe to account.connected.
@@ -8993,14 +9661,14 @@ export type ImessageSenderLifecycle = {
8993
9661
  createdAt?: string;
8994
9662
  };
8995
9663
 
8996
- export type kind3 = 'phone' | 'email';
9664
+ export type kind7 = 'phone' | 'email';
8997
9665
 
8998
9666
  export type region = 'US' | 'GB';
8999
9667
 
9000
9668
  /**
9001
9669
  * `awaiting_payment`: the first-month charge is still being confirmed by the card; the number is ordered automatically once it is paid (usually under 5 minutes), or the order fails with `failureReason` when the card declines or nothing confirms within 30 minutes.
9002
9670
  */
9003
- export type status28 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
9671
+ export type status32 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
9004
9672
 
9005
9673
  /**
9006
9674
  * Click attribution for a conversation that started from a Meta ad or
@@ -9203,7 +9871,7 @@ export type InboxWebhookConversation = {
9203
9871
  contactId?: string;
9204
9872
  };
9205
9873
 
9206
- export type status29 = 'active' | 'archived';
9874
+ export type status33 = 'active' | 'archived';
9207
9875
 
9208
9876
  /**
9209
9877
  * The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
@@ -9241,7 +9909,7 @@ export type InboxWebhookConversationDetail = {
9241
9909
  contactId?: string;
9242
9910
  };
9243
9911
 
9244
- export type platform9 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'rcs' | 'slack' | 'tiktok' | 'imessage';
9912
+ export type platform10 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'rcs' | 'slack' | 'tiktok' | 'imessage';
9245
9913
 
9246
9914
  /**
9247
9915
  * The message object included in inbox webhook payloads.
@@ -9360,7 +10028,7 @@ export type InboxWebhookMessage = {
9360
10028
  isRead: boolean;
9361
10029
  };
9362
10030
 
9363
- export type platform10 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
10031
+ export type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
9364
10032
 
9365
10033
  export type direction3 = 'incoming' | 'outgoing';
9366
10034
 
@@ -9488,7 +10156,7 @@ export type InstagramAccountInsightsResponse = {
9488
10156
  /**
9489
10157
  * Platform that served this response.
9490
10158
  */
9491
- export type platform11 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
10159
+ export type platform12 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
9492
10160
 
9493
10161
  export type metricType = 'time_series' | 'total_value';
9494
10162
 
@@ -9933,7 +10601,7 @@ export type InstagramVideoFallback = {
9933
10601
  };
9934
10602
  };
9935
10603
 
9936
- export type kind4 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
10604
+ export type kind8 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
9937
10605
 
9938
10606
  /**
9939
10607
  * A Google Search keyword: a bare string (BROAD match), or an object naming the match type.
@@ -9946,6 +10614,12 @@ export type KeywordEntry = string | {
9946
10614
  matchType?: 'exact' | 'phrase' | 'broad';
9947
10615
  };
9948
10616
 
10617
+ export type LedgerAccountSide = {
10618
+ scopeType?: string;
10619
+ scopeId?: string;
10620
+ bucket?: string;
10621
+ };
10622
+
9949
10623
  /**
9950
10624
  * LinkedIn-specific options for POST /v1/ads/boost and POST /v1/ads/create: campaign bidding and delivery controls, plus the LinkedIn-only creative formats on /v1/ads/create. Unknown keys are rejected.
9951
10625
  *
@@ -10379,7 +11053,7 @@ export type LinkedInMentionIssue = {
10379
11053
  /**
10380
11054
  * Why it failed.
10381
11055
  */
10382
- export type code = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
11056
+ export type code2 = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
10383
11057
 
10384
11058
  /**
10385
11059
  * Up to 20 images, no multi-video. Single PDF supported (max 100MB). Link previews auto-generated when no media attached. Use organizationUrn for multi-org posting. Geo-restriction only works for organization pages (not personal profiles) and requires the targeted audience to exceed 300 followers. Polls are supported via the poll object: 2-4 options, cannot be combined with media or reshareUrl, cannot be edited after publishing, and API-created polls are non-sponsored only.
@@ -10548,7 +11222,7 @@ export type MediaItem = {
10548
11222
  /**
10549
11223
  * Optional when the item names a connected file (`fileId`): inferred from the file's MIME type.
10550
11224
  */
10551
- export type type14 = 'image' | 'video' | 'gif' | 'document';
11225
+ export type type16 = 'image' | 'video' | 'gif' | 'document';
10552
11226
 
10553
11227
  export type MediaSubtitle = {
10554
11228
  /**
@@ -11201,7 +11875,7 @@ export type OAuthApp = {
11201
11875
  /**
11202
11876
  * `ok`: the platform accepted the keys at the last check. `unchecked`: the check could not reach a verdict (see lastError). `invalid`: the platform rejected the keys; connects and token refreshes through this app will fail until the secret is rotated.
11203
11877
  */
11204
- export type status30 = 'ok' | 'unchecked' | 'invalid';
11878
+ export type status34 = 'ok' | 'unchecked' | 'invalid';
11205
11879
 
11206
11880
  export type OAuthAppSetup = {
11207
11881
  platform: string;
@@ -11416,7 +12090,7 @@ export type OwnedPhoneNumber = {
11416
12090
  }>;
11417
12091
  };
11418
12092
 
11419
- export type status31 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
12093
+ export type status35 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
11420
12094
 
11421
12095
  export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
11422
12096
 
@@ -11456,6 +12130,11 @@ export type ParameterCatalogProductId = string;
11456
12130
  */
11457
12131
  export type ParameterCatalogTokenAccountId = string;
11458
12132
 
12133
+ /**
12134
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
12135
+ */
12136
+ export type ParameterCreatorPortalToken = string;
12137
+
11459
12138
  /**
11460
12139
  * The connected Google or Microsoft account.
11461
12140
  */
@@ -11481,6 +12160,76 @@ export type ParameterPageParam = number;
11481
12160
  */
11482
12161
  export type ParameterUnsyncedMetaAdAccountId = string;
11483
12162
 
12163
+ export type PayoutBatch = {
12164
+ id: string;
12165
+ campaignId: (string) | null;
12166
+ /**
12167
+ * `awaiting_payment` until the card payment completes; `paying` while transfers go out; then `paid`, `partially_failed` (some items failed or were skipped), `failed` (none paid) or `expired` (the Checkout expired unpaid, every amount is payable again).
12168
+ */
12169
+ status: 'awaiting_payment' | 'paying' | 'paid' | 'partially_failed' | 'failed' | 'expired';
12170
+ method: 'card';
12171
+ /**
12172
+ * Total the creators receive.
12173
+ */
12174
+ amountCents: number;
12175
+ /**
12176
+ * Total Zernio fee.
12177
+ */
12178
+ feeCents: number;
12179
+ /**
12180
+ * The card charge: amountCents plus feeCents.
12181
+ */
12182
+ totalCents: number;
12183
+ items: Array<PayoutBatchItem>;
12184
+ paidAt: (string) | null;
12185
+ finishedAt: (string) | null;
12186
+ createdAt: string;
12187
+ };
12188
+
12189
+ /**
12190
+ * `awaiting_payment` until the card payment completes; `paying` while transfers go out; then `paid`, `partially_failed` (some items failed or were skipped), `failed` (none paid) or `expired` (the Checkout expired unpaid, every amount is payable again).
12191
+ */
12192
+ export type status36 = 'awaiting_payment' | 'paying' | 'paid' | 'partially_failed' | 'failed' | 'expired';
12193
+
12194
+ export type method2 = 'card';
12195
+
12196
+ export type PayoutBatchItem = {
12197
+ id: string;
12198
+ participantId: string;
12199
+ creator: {
12200
+ displayName: string;
12201
+ };
12202
+ /**
12203
+ * What the creator receives, in full.
12204
+ */
12205
+ amountCents: number;
12206
+ /**
12207
+ * Zernio fee on top: 4% with a 50 cent minimum.
12208
+ */
12209
+ feeCents: number;
12210
+ /**
12211
+ * amountCents plus feeCents.
12212
+ */
12213
+ totalCents: number;
12214
+ /**
12215
+ * `skipped`: not paid because payout setup was not finished, or the card payment never completed; the amount is payable again. `failed`: Stripe refused the transfer; the amount is payable again.
12216
+ */
12217
+ status: 'pending' | 'paid' | 'failed' | 'skipped';
12218
+ /**
12219
+ * Why the item was not paid, in plain words.
12220
+ */
12221
+ failureReason: (string) | null;
12222
+ /**
12223
+ * The treasury transfer that paid this item.
12224
+ */
12225
+ transferId: (string) | null;
12226
+ };
12227
+
12228
+ /**
12229
+ * `skipped`: not paid because payout setup was not finished, or the card payment never completed; the amount is payable again. `failed`: Stripe refused the transfer; the amount is payable again.
12230
+ */
12231
+ export type status37 = 'pending' | 'paid' | 'failed' | 'skipped';
12232
+
11484
12233
  export type PhoneNumberStockWatch = {
11485
12234
  id: string;
11486
12235
  /**
@@ -11588,7 +12337,7 @@ export type PlatformAnalytics = {
11588
12337
  isOwner?: (boolean) | null;
11589
12338
  };
11590
12339
 
11591
- export type status32 = 'published' | 'failed';
12340
+ export type status38 = 'published' | 'failed';
11592
12341
 
11593
12342
  /**
11594
12343
  * Sync state of analytics for this platform
@@ -11734,7 +12483,7 @@ export type PortfolioBidStrategy = {
11734
12483
  targetImpressionShare?: (GoogleTargetImpressionShare | null);
11735
12484
  };
11736
12485
 
11737
- export type type15 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE' | 'TARGET_IMPRESSION_SHARE';
12486
+ export type type17 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE' | 'TARGET_IMPRESSION_SHARE';
11738
12487
 
11739
12488
  export type Post = {
11740
12489
  _id?: string;
@@ -11791,7 +12540,7 @@ export type Post = {
11791
12540
  /**
11792
12541
  * `cancelled` is set by POST /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes `partial`); cancelled posts can be edited and rescheduled like drafts. `pending_approval` (set by `requiresApproval: true`) never publishes until POST /v1/posts/{postId}/review approves it.
11793
12542
  */
11794
- export type status33 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
12543
+ export type status39 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
11795
12544
 
11796
12545
  export type visibility3 = 'public' | 'private' | 'unlisted';
11797
12546
 
@@ -11881,6 +12630,40 @@ export type PostAnalytics = {
11881
12630
  lastUpdated?: string;
11882
12631
  };
11883
12632
 
12633
+ export type PostAuthenticity = {
12634
+ /**
12635
+ * The external post the score belongs to
12636
+ */
12637
+ postId: string;
12638
+ /**
12639
+ * Higher means the view pattern looks more organic
12640
+ */
12641
+ score: number;
12642
+ /**
12643
+ * How much data the score rests on
12644
+ */
12645
+ confidence: number;
12646
+ /**
12647
+ * Each factor that lowered the score, with its weight in points
12648
+ */
12649
+ reasons: Array<{
12650
+ code: 'late_block' | 'flat_engagement' | 'view_follower_gap' | 'cap_seeking' | 'prior_flags' | 'no_watch_signal';
12651
+ /**
12652
+ * Points taken off 100. Zero for no_watch_signal, which only lowers confidence.
12653
+ */
12654
+ weight: number;
12655
+ }>;
12656
+ /**
12657
+ * Scoring model version
12658
+ */
12659
+ version: string;
12660
+ computedAt: string;
12661
+ /**
12662
+ * Number of samples the score was computed from
12663
+ */
12664
+ sampleCount: number;
12665
+ };
12666
+
11884
12667
  export type PostCreateResponse = {
11885
12668
  message?: string;
11886
12669
  post?: Post;
@@ -11957,6 +12740,32 @@ export type PostRetryResponse = {
11957
12740
  post?: Post;
11958
12741
  };
11959
12742
 
12743
+ export type PostSample = {
12744
+ /**
12745
+ * When Zernio fetched this reading from the platform
12746
+ */
12747
+ syncedAt: string;
12748
+ views: number;
12749
+ likes: number;
12750
+ comments: number;
12751
+ /**
12752
+ * Null on platforms that do not return shares
12753
+ */
12754
+ shares: (number) | null;
12755
+ /**
12756
+ * Null on platforms that do not return saves
12757
+ */
12758
+ saves: (number) | null;
12759
+ /**
12760
+ * Average watch time in seconds. Null when the platform gives none.
12761
+ */
12762
+ watchSeconds: (number) | null;
12763
+ /**
12764
+ * Share of viewers who watched to the end, 0 to 1. Null when the platform gives none.
12765
+ */
12766
+ completionRate: (number) | null;
12767
+ };
12768
+
11960
12769
  export type PostsListResponse = {
11961
12770
  posts?: Array<Post>;
11962
12771
  pagination?: (Pagination & {
@@ -12028,7 +12837,7 @@ export type Product = {
12028
12837
  publishedAt?: (string) | null;
12029
12838
  };
12030
12839
 
12031
- export type status34 = 'active' | 'draft' | 'archived';
12840
+ export type status40 = 'active' | 'draft' | 'archived';
12032
12841
 
12033
12842
  export type ProductImage = {
12034
12843
  url?: string;
@@ -12247,7 +13056,7 @@ export type RcsAgent = {
12247
13056
  createdAt?: string;
12248
13057
  };
12249
13058
 
12250
- export type status35 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
13059
+ export type status41 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
12251
13060
 
12252
13061
  export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
12253
13062
 
@@ -12299,7 +13108,7 @@ export type RcsBrand = RcsBrandInput & {
12299
13108
  /**
12300
13109
  * draft = not filed yet (still editable).
12301
13110
  */
12302
- export type status36 = 'draft' | 'vetting' | 'verified' | 'rejected';
13111
+ export type status42 = 'draft' | 'vetting' | 'verified' | 'rejected';
12303
13112
 
12304
13113
  export type RcsBrandInput = {
12305
13114
  displayName: string;
@@ -12386,7 +13195,7 @@ export type RcsCarrierApproval = {
12386
13195
 
12387
13196
  export type scope3 = 'carrier' | 'hub' | 'bot';
12388
13197
 
12389
- export type status37 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
13198
+ export type status43 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
12390
13199
 
12391
13200
  /**
12392
13201
  * Message content. `suggestions` (max 11) render as chips under the message.
@@ -12412,7 +13221,7 @@ export type RcsContent = {
12412
13221
  suggestions?: Array<RcsSuggestion>;
12413
13222
  };
12414
13223
 
12415
- export type type16 = 'text';
13224
+ export type type18 = 'text';
12416
13225
 
12417
13226
  export type orientation = 'VERTICAL' | 'HORIZONTAL';
12418
13227
 
@@ -12525,7 +13334,7 @@ export type RcsSuggestion = {
12525
13334
  postbackData?: string;
12526
13335
  };
12527
13336
 
12528
- export type type17 = 'reply';
13337
+ export type type19 = 'reply';
12529
13338
 
12530
13339
  export type application = 'BROWSER' | 'WEBVIEW';
12531
13340
 
@@ -12842,7 +13651,7 @@ export type ReviewWebhookReview = {
12842
13651
  /**
12843
13652
  * Platform the review originated on. Currently Google Business Profile only.
12844
13653
  */
12845
- export type platform12 = 'googlebusiness';
13654
+ export type platform13 = 'googlebusiness';
12846
13655
 
12847
13656
  /**
12848
13657
  * A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
@@ -13140,7 +13949,7 @@ export type SocialAccount = {
13140
13949
  };
13141
13950
  };
13142
13951
 
13143
- export type platform13 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'google' | 'microsoft' | 'hubspot' | 'webflow' | 'googleanalytics';
13952
+ export type platform14 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'google' | 'microsoft' | 'hubspot' | 'webflow' | 'googleanalytics';
13144
13953
 
13145
13954
  /**
13146
13955
  * TikTok accounts only. The account type TikTok reported when the account was connected. `personal` accounts cannot use TikTok direct messages through the API (TikTok limits Business Messaging to Business Accounts): skip the inbox for them and tell the user to switch to a Business Account in the TikTok app, then reconnect. `business` is the prerequisite, not a guarantee; messaging also needs the messaging scopes granted and TikTok's regional availability. `unknown` on accounts connected before this was captured or whose grant left out the account-type scope.
@@ -13224,7 +14033,7 @@ export type StorePixelInstall = {
13224
14033
  /**
13225
14034
  * WordPress only.
13226
14035
  */
13227
- export type method2 = 'wordpress_widget';
14036
+ export type method3 = 'wordpress_widget';
13228
14037
 
13229
14038
  export type SupportRun = {
13230
14039
  /**
@@ -13282,7 +14091,7 @@ export type SupportRun = {
13282
14091
  /**
13283
14092
  * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
13284
14093
  */
13285
- export type status38 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
14094
+ export type status44 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
13286
14095
 
13287
14096
  /**
13288
14097
  * Why the run stopped. Null while it is in progress.
@@ -13997,12 +14806,12 @@ export type TrackingTag = {
13997
14806
  autoTagging?: boolean;
13998
14807
  };
13999
14808
 
14000
- export type platform14 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads' | 'whopads';
14809
+ export type platform15 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads' | 'whopads';
14001
14810
 
14002
14811
  /**
14003
14812
  * Platform-native flavor of the tag (Meta: `pixel`).
14004
14813
  */
14005
- export type kind5 = 'pixel' | 'tag' | 'insight_tag';
14814
+ export type kind9 = 'pixel' | 'tag' | 'insight_tag';
14006
14815
 
14007
14816
  /**
14008
14817
  * One health check the platform runs on a tracking tag.
@@ -14152,6 +14961,154 @@ export type TrackingTagUser = {
14152
14961
  tasks: Array<(string)>;
14153
14962
  };
14154
14963
 
14964
+ export type TrackingWindow = {
14965
+ id: string;
14966
+ /**
14967
+ * The external post being tracked
14968
+ */
14969
+ postId: string;
14970
+ accountId: string;
14971
+ platform: string;
14972
+ /**
14973
+ * The post's id on the platform
14974
+ */
14975
+ platformPostId: string;
14976
+ startsAt: string;
14977
+ endsAt: string;
14978
+ status: 'open' | 'completing' | 'completed' | 'cancelled';
14979
+ /**
14980
+ * When the closing read ran. Null until then.
14981
+ */
14982
+ finalReadAt: (string) | null;
14983
+ /**
14984
+ * How the window closed. Null while it is open.
14985
+ */
14986
+ completionReason: ('final_read' | 'unreachable' | 'post_deleted' | 'cancelled') | null;
14987
+ requestedBy: string;
14988
+ /**
14989
+ * The latest verified numbers we read from the platform. Null when no sample exists yet.
14990
+ */
14991
+ latest: {
14992
+ views: number;
14993
+ likes: number;
14994
+ comments: number;
14995
+ shares: number;
14996
+ saves: number;
14997
+ syncedAt: (string) | null;
14998
+ } | null;
14999
+ };
15000
+
15001
+ export type status45 = 'open' | 'completing' | 'completed' | 'cancelled';
15002
+
15003
+ /**
15004
+ * How the window closed. Null while it is open.
15005
+ */
15006
+ export type completionReason = 'final_read' | 'unreachable' | 'post_deleted' | 'cancelled';
15007
+
15008
+ export type TrackingWindowResponse = {
15009
+ window: TrackingWindow;
15010
+ };
15011
+
15012
+ export type TreasuryPayee = {
15013
+ id?: string;
15014
+ payeeType?: 'creator' | 'ad_account';
15015
+ payeeRef?: string;
15016
+ country?: string;
15017
+ onboardingStatus?: 'pending' | 'complete' | 'restricted';
15018
+ detailsSubmitted?: boolean;
15019
+ payoutsEnabled?: boolean;
15020
+ createdAt?: string;
15021
+ };
15022
+
15023
+ export type payeeType = 'creator' | 'ad_account';
15024
+
15025
+ export type onboardingStatus = 'pending' | 'complete' | 'restricted';
15026
+
15027
+ export type TreasuryTopup = {
15028
+ id?: string;
15029
+ method?: 'card' | 'bank_transfer';
15030
+ /**
15031
+ * `balance` funds your balance; `payout_batch` is the card payment of one payout batch, which pays its creators directly.
15032
+ */
15033
+ purpose?: 'balance' | 'payout_batch';
15034
+ /**
15035
+ * The payout batch this payment paid for; null for a balance top-up.
15036
+ */
15037
+ payoutBatch?: {
15038
+ id?: string;
15039
+ campaignId?: (string) | null;
15040
+ } | null;
15041
+ /**
15042
+ * True for a `payout_batch` payment: Zernio pays the Stripe processing fee out of its transfer fee, so you are credited the whole charge.
15043
+ */
15044
+ feeCoveredByZernio?: boolean;
15045
+ /**
15046
+ * Gross amount charged
15047
+ */
15048
+ amountCents?: number;
15049
+ /**
15050
+ * Stripe processing fee you paid; null until Stripe reports it, 0 when Zernio covers it
15051
+ */
15052
+ stripeFeeCents?: (number) | null;
15053
+ /**
15054
+ * Amount credited to your balance: gross minus the Stripe fee, or the whole charge when Zernio covers the fee; null until Stripe reports it
15055
+ */
15056
+ netCents?: (number) | null;
15057
+ status?: 'pending' | 'succeeded' | 'failed' | 'expired';
15058
+ createdAt?: string;
15059
+ succeededAt?: (string) | null;
15060
+ };
15061
+
15062
+ export type method4 = 'card' | 'bank_transfer';
15063
+
15064
+ /**
15065
+ * `balance` funds your balance; `payout_batch` is the card payment of one payout batch, which pays its creators directly.
15066
+ */
15067
+ export type purpose = 'balance' | 'payout_batch';
15068
+
15069
+ export type status46 = 'pending' | 'succeeded' | 'failed' | 'expired';
15070
+
15071
+ export type TreasuryTransfer = {
15072
+ id?: string;
15073
+ /**
15074
+ * 24-character payee id
15075
+ */
15076
+ payeeId?: string;
15077
+ /**
15078
+ * The payee's name when Zernio knows it, for example a creator's display name in one of your creator campaigns; null otherwise
15079
+ */
15080
+ payeeName?: (string) | null;
15081
+ destinationType?: 'creator' | 'ad_account';
15082
+ /**
15083
+ * Amount the payee receives, in full
15084
+ */
15085
+ amountCents?: number;
15086
+ /**
15087
+ * Zernio fee added on top, 4% with a 50 cent minimum
15088
+ */
15089
+ feeCents?: number;
15090
+ /**
15091
+ * Amount debited from your balance: amountCents plus feeCents
15092
+ */
15093
+ totalCents?: number;
15094
+ currency?: string;
15095
+ reference?: {
15096
+ type?: string;
15097
+ id?: string;
15098
+ /**
15099
+ * What the transfer paid for, when Zernio knows it: the campaign name for a creator campaign payout; null otherwise
15100
+ */
15101
+ name?: (string) | null;
15102
+ };
15103
+ status?: 'pending' | 'paid' | 'failed' | 'reversed';
15104
+ failureReason?: (string) | null;
15105
+ createdAt?: string;
15106
+ };
15107
+
15108
+ export type destinationType = 'creator' | 'ad_account';
15109
+
15110
+ export type status47 = 'pending' | 'paid' | 'failed' | 'reversed';
15111
+
14155
15112
  /**
14156
15113
  * X-specific post options. The article field creates a long-form X Article and is mutually exclusive with tweet media and tweet-only options. Geo-restriction applies at the media level: media is hidden outside the specified countries while tweet text remains visible.
14157
15114
  *
@@ -14232,6 +15189,25 @@ export type TwitterPlatformData = {
14232
15189
  */
14233
15190
  export type replySettings = 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
14234
15191
 
15192
+ /**
15193
+ * Every field is optional; send at least one. `economics` can only change while the campaign is a draft.
15194
+ */
15195
+ export type UpdateCreatorCampaignRequest = {
15196
+ name?: string;
15197
+ brandName?: string;
15198
+ platforms?: Array<('tiktok' | 'instagram' | 'youtube')>;
15199
+ contentRules?: (string) | null;
15200
+ startsAt?: (string) | null;
15201
+ endsAt?: (string) | null;
15202
+ trackingDays?: number;
15203
+ holdDays?: number;
15204
+ maxPostAgeMinutes?: number;
15205
+ settlement?: 'none' | 'external' | 'treasury';
15206
+ economics?: CreatorCampaignEconomics;
15207
+ caps?: CreatorCampaignCaps;
15208
+ branding?: (CreatorCampaignBranding | null);
15209
+ };
15210
+
14235
15211
  export type UploadedFile = {
14236
15212
  type?: 'image' | 'video' | 'document';
14237
15213
  url?: string;
@@ -14240,7 +15216,7 @@ export type UploadedFile = {
14240
15216
  mimeType?: string;
14241
15217
  };
14242
15218
 
14243
- export type type18 = 'image' | 'video' | 'document';
15219
+ export type type20 = 'image' | 'video' | 'document';
14244
15220
 
14245
15221
  export type UploadTokenResponse = {
14246
15222
  token?: string;
@@ -14249,7 +15225,7 @@ export type UploadTokenResponse = {
14249
15225
  status?: 'pending' | 'completed' | 'expired';
14250
15226
  };
14251
15227
 
14252
- export type status39 = 'pending' | 'completed' | 'expired';
15228
+ export type status48 = 'pending' | 'completed' | 'expired';
14253
15229
 
14254
15230
  export type UploadTokenStatusResponse = {
14255
15231
  token?: string;
@@ -14760,7 +15736,7 @@ export type Verification = {
14760
15736
  resend?: boolean;
14761
15737
  };
14762
15738
 
14763
- export type status40 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
15739
+ export type status49 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
14764
15740
 
14765
15741
  export type channel5 = 'sms' | 'whatsapp';
14766
15742
 
@@ -14792,7 +15768,7 @@ export type Webhook = {
14792
15768
  /**
14793
15769
  * Events subscribed to
14794
15770
  */
14795
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted')>;
15771
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted')>;
14796
15772
  /**
14797
15773
  * Whether webhook delivery is enabled
14798
15774
  */
@@ -14814,7 +15790,7 @@ export type Webhook = {
14814
15790
  /**
14815
15791
  * Resource groups this subscription does not receive (opt-out denylist, same vocabulary and same semantics as the field on API keys). Absent or empty means the subscription receives every event listed in `events`, which is how every subscription created before this field existed behaves. An event whose group is listed here is dropped before delivery even when it is still present in `events`, and the same check runs on every replay path (test fire, redelivery, dead-letter requeue). Editing the denylist applies to every event emitted afterwards; events already queued when the edit landed can still be delivered for up to five minutes after they were enqueued.
14816
15792
  */
14817
- disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files')>;
15793
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files')>;
14818
15794
  /**
14819
15795
  * Profiles this subscription receives events for (allowlist). Absent or empty means every profile, which is how every subscription created before this field existed behaves. A scoped subscription is only sent events attributable to a listed profile. An aggregate `post.*` event is attributed to the profile of every account the post targets, so a post spanning two scoped endpoints' profiles reaches both. Events with no profile behind them (`verification.*`, `phone_number.*`, a legacy post whose accounts were deleted) are not delivered to it. Applied when the event is emitted: a redelivery replays a delivery already made to this endpoint, and a test fire ignores the list.
14820
15796
  */
@@ -14938,7 +15914,7 @@ export type WebhookLog = {
14938
15914
  /**
14939
15915
  * Delivery outcome
14940
15916
  */
14941
- export type status41 = 'success' | 'failed';
15917
+ export type status50 = 'success' | 'failed';
14942
15918
 
14943
15919
  /**
14944
15920
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -15055,7 +16031,7 @@ export type event = 'account.ads.initial_sync_completed';
15055
16031
  /**
15056
16032
  * Overall outcome of the initial sync.
15057
16033
  */
15058
- export type status42 = 'success' | 'failure';
16034
+ export type status51 = 'success' | 'failure';
15059
16035
 
15060
16036
  /**
15061
16037
  * Stable category for UX branching. New values may be added; existing ones are
@@ -15500,7 +16476,7 @@ export type WebhookPayloadAdReview = {
15500
16476
 
15501
16477
  export type event10 = 'ad.review.approved' | 'ad.review.rejected';
15502
16478
 
15503
- export type status43 = 'approved' | 'rejected';
16479
+ export type status52 = 'approved' | 'rejected';
15504
16480
 
15505
16481
  /**
15506
16482
  * Webhook payload for the `ad_rule.triggered` event.
@@ -15835,7 +16811,7 @@ export type event13 = 'ad.video.processed';
15835
16811
  /**
15836
16812
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
15837
16813
  */
15838
- export type status44 = 'ready' | 'error';
16814
+ export type status53 = 'ready' | 'error';
15839
16815
 
15840
16816
  /**
15841
16817
  * Webhook payload for `analytics.synced`. Fired once per connected account each
@@ -16234,6 +17210,191 @@ export type event21 = 'campaign.budget.depleted';
16234
17210
  */
16235
17211
  export type level6 = 'CAMPAIGN';
16236
17212
 
17213
+ /**
17214
+ * Webhook payload for `campaign_participant.joined`, `campaign_participant.suspended` and
17215
+ * `campaign_participant.removed`. `participant.status` is the status after the change.
17216
+ * `participant.joinedAt` is null for a participant removed before they ever joined.
17217
+ *
17218
+ */
17219
+ export type WebhookPayloadCampaignParticipant = {
17220
+ /**
17221
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
17222
+ */
17223
+ id: string;
17224
+ profiles?: WebhookProfiles;
17225
+ /**
17226
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
17227
+ */
17228
+ test?: boolean;
17229
+ event: 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed';
17230
+ campaign: {
17231
+ id: string;
17232
+ name: string;
17233
+ };
17234
+ participant: {
17235
+ id: string;
17236
+ status: 'invited' | 'active' | 'suspended' | 'removed';
17237
+ joinedAt: (string) | null;
17238
+ };
17239
+ creator: {
17240
+ id: string;
17241
+ displayName: string;
17242
+ };
17243
+ /**
17244
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
17245
+ */
17246
+ timestamp: string;
17247
+ };
17248
+
17249
+ export type event22 = 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed';
17250
+
17251
+ /**
17252
+ * Webhook payload for `campaign_payout.payable` and `campaign_payout.settled`.
17253
+ * `payable` fires when a participant's held earnings mature; `payout.payableCents` is the
17254
+ * participant's whole payable balance, so a partner paying from its own rails pays that
17255
+ * amount and records it with `POST /v1/creator-campaigns/{campaignId}/participants/{participantId}/settle`.
17256
+ * `settled` fires when a settlement is recorded and carries `payout.settlement`.
17257
+ * `failed` fires when a treasury payout is refused, unconfirmed or reversed; the amount returns to payable (minus anything a rejection claws back) and `payout.failure` says why.
17258
+ *
17259
+ */
17260
+ export type WebhookPayloadCampaignPayout = {
17261
+ /**
17262
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
17263
+ */
17264
+ id: string;
17265
+ profiles?: WebhookProfiles;
17266
+ /**
17267
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
17268
+ */
17269
+ test?: boolean;
17270
+ event: 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed';
17271
+ campaign: {
17272
+ id: string;
17273
+ name: string;
17274
+ settlement: 'none' | 'external' | 'treasury';
17275
+ };
17276
+ participant: {
17277
+ id: string;
17278
+ };
17279
+ creator: {
17280
+ id: string;
17281
+ displayName: string;
17282
+ };
17283
+ payout: {
17284
+ /**
17285
+ * The participant's payable balance after this event.
17286
+ */
17287
+ payableCents: number;
17288
+ /**
17289
+ * Present on campaign_payout.settled only.
17290
+ */
17291
+ settlement?: {
17292
+ /**
17293
+ * The ledger settlement entry.
17294
+ */
17295
+ entryId: string;
17296
+ amountCents: number;
17297
+ externalReference: (string) | null;
17298
+ /**
17299
+ * True when the payout was made outside Zernio and only recorded here; false when Zernio moved the money through the treasury.
17300
+ */
17301
+ recorded: boolean;
17302
+ /**
17303
+ * Treasury settlement only: the Zernio transfer that moved the money. The creator receives amountCents in full.
17304
+ */
17305
+ transferId?: string;
17306
+ /**
17307
+ * Treasury settlement only: the transfer fee, added on top of amountCents.
17308
+ */
17309
+ feeCents?: number;
17310
+ /**
17311
+ * Treasury settlement only: debited from your balance, amountCents plus feeCents.
17312
+ */
17313
+ totalCents?: number;
17314
+ };
17315
+ /**
17316
+ * Present on campaign_payout.failed only.
17317
+ */
17318
+ failure?: {
17319
+ /**
17320
+ * The Zernio transfer that did not go through.
17321
+ */
17322
+ transferId: string;
17323
+ /**
17324
+ * The payout amount that did not reach the creator. It is returned to payable, minus any amount a rejection made while the payout was in flight claws back to the campaign budget; payableCents is the balance after both.
17325
+ */
17326
+ amountCents: number;
17327
+ /**
17328
+ * returned: Stripe refused the transfer. stale: it could not be confirmed with Stripe within 24 hours. reversed: Stripe reversed it after it was sent; the settlement is undone.
17329
+ */
17330
+ reason: 'returned' | 'stale' | 'reversed';
17331
+ };
17332
+ };
17333
+ /**
17334
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
17335
+ */
17336
+ timestamp: string;
17337
+ };
17338
+
17339
+ export type event23 = 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed';
17340
+
17341
+ /**
17342
+ * returned: Stripe refused the transfer. stale: it could not be confirmed with Stripe within 24 hours. reversed: Stripe reversed it after it was sent; the settlement is undone.
17343
+ */
17344
+ export type reason2 = 'returned' | 'stale' | 'reversed';
17345
+
17346
+ /**
17347
+ * Webhook payload for `campaign_submission.received`, `campaign_submission.flagged`,
17348
+ * `campaign_submission.pending_review`, `campaign_submission.approved` and
17349
+ * `campaign_submission.rejected`. `received` fires for every accepted submission;
17350
+ * `flagged` fires when a submission gains a flag it did not carry before (at submission or
17351
+ * on a later sync), and `submission.flags` lists every flag it carries; `pending_review`
17352
+ * fires when the submission becomes ready for the operator's review; `approved` and
17353
+ * `rejected` fire on the operator's decision.
17354
+ *
17355
+ */
17356
+ export type WebhookPayloadCampaignSubmission = {
17357
+ /**
17358
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
17359
+ */
17360
+ id: string;
17361
+ profiles?: WebhookProfiles;
17362
+ /**
17363
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
17364
+ */
17365
+ test?: boolean;
17366
+ event: 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected';
17367
+ campaign: {
17368
+ id: string;
17369
+ name: string;
17370
+ };
17371
+ participant: {
17372
+ id: string;
17373
+ };
17374
+ creator: {
17375
+ id: string;
17376
+ displayName: string;
17377
+ };
17378
+ submission: {
17379
+ id: string;
17380
+ platform: string;
17381
+ platformPostId: string;
17382
+ platformPostUrl: (string) | null;
17383
+ status: string;
17384
+ viewsAtSubmission: (number) | null;
17385
+ flags: Array<{
17386
+ code: string;
17387
+ detail: string;
17388
+ }>;
17389
+ };
17390
+ /**
17391
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
17392
+ */
17393
+ timestamp: string;
17394
+ };
17395
+
17396
+ export type event24 = 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected';
17397
+
16237
17398
  /**
16238
17399
  * Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
16239
17400
  */
@@ -16409,9 +17570,9 @@ export type WebhookPayloadComment = {
16409
17570
  timestamp: string;
16410
17571
  };
16411
17572
 
16412
- export type event22 = 'comment.received';
17573
+ export type event25 = 'comment.received';
16413
17574
 
16414
- export type platform15 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
17575
+ export type platform16 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
16415
17576
 
16416
17577
  export type WebhookPayloadCommerceOrder = {
16417
17578
  /**
@@ -16455,9 +17616,9 @@ export type WebhookPayloadCommerceOrder = {
16455
17616
  };
16456
17617
  };
16457
17618
 
16458
- export type event23 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
17619
+ export type event26 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
16459
17620
 
16460
- export type type19 = 'order';
17621
+ export type type21 = 'order';
16461
17622
 
16462
17623
  export type WebhookPayloadCommerceProduct = {
16463
17624
  /**
@@ -16498,9 +17659,9 @@ export type WebhookPayloadCommerceProduct = {
16498
17659
  };
16499
17660
  };
16500
17661
 
16501
- export type event24 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
17662
+ export type event27 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
16502
17663
 
16503
- export type type20 = 'product';
17664
+ export type type22 = 'product';
16504
17665
 
16505
17666
  /**
16506
17667
  * Webhook payload for contact.updated and contact.deleted, fired after a provider contacts sync (Google Contacts, Outlook) changed a contact. Read the contact with `GET /v1/contacts/{id}`.
@@ -16527,7 +17688,7 @@ export type WebhookPayloadContact = {
16527
17688
  timestamp: string;
16528
17689
  };
16529
17690
 
16530
- export type event25 = 'contact.updated' | 'contact.deleted';
17691
+ export type event28 = 'contact.updated' | 'contact.deleted';
16531
17692
 
16532
17693
  export type changeType2 = 'updated' | 'deleted';
16533
17694
 
@@ -16567,7 +17728,7 @@ export type WebhookPayloadContactFieldChanged = {
16567
17728
  source: 'api' | 'workflow' | 'automation';
16568
17729
  };
16569
17730
 
16570
- export type event26 = 'contact.field_changed';
17731
+ export type event29 = 'contact.field_changed';
16571
17732
 
16572
17733
  /**
16573
17734
  * Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
@@ -16599,7 +17760,7 @@ export type WebhookPayloadContactTag = {
16599
17760
  source: 'api' | 'workflow' | 'automation';
16600
17761
  };
16601
17762
 
16602
- export type event27 = 'contact.tag_added' | 'contact.tag_removed';
17763
+ export type event30 = 'contact.tag_added' | 'contact.tag_removed';
16603
17764
 
16604
17765
  /**
16605
17766
  * Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
@@ -16645,7 +17806,7 @@ export type WebhookPayloadConversationControlChanged = {
16645
17806
  timestamp: string;
16646
17807
  };
16647
17808
 
16648
- export type event28 = 'conversation.control_changed';
17809
+ export type event31 = 'conversation.control_changed';
16649
17810
 
16650
17811
  /**
16651
17812
  * Who answers now. ai_agent: Meta Business Agent (WhatsApp); app: you; other: another app (a WhatsApp partner, or a Messenger / Instagram receiver such as Page Inbox).
@@ -16704,7 +17865,46 @@ export type WebhookPayloadConversationStarted = {
16704
17865
  timestamp: string;
16705
17866
  };
16706
17867
 
16707
- export type event29 = 'conversation.started';
17868
+ export type event32 = 'conversation.started';
17869
+
17870
+ /**
17871
+ * Webhook payload for `creator_campaign.budget_exhausted` and `creator_campaign.closed`.
17872
+ * `budget_exhausted` fires once, when the campaign's earnings first reach
17873
+ * `campaign.budgetCents`, and carries `campaign.budgetExhaustedAt`. `closed` fires once,
17874
+ * when the campaign closes, and carries `campaign.closedAt`.
17875
+ *
17876
+ */
17877
+ export type WebhookPayloadCreatorCampaign = {
17878
+ /**
17879
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
17880
+ */
17881
+ id: string;
17882
+ profiles?: WebhookProfiles;
17883
+ /**
17884
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
17885
+ */
17886
+ test?: boolean;
17887
+ event: 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
17888
+ campaign: {
17889
+ id: string;
17890
+ name: string;
17891
+ budgetCents: number;
17892
+ /**
17893
+ * Present on creator_campaign.budget_exhausted only.
17894
+ */
17895
+ budgetExhaustedAt?: string;
17896
+ /**
17897
+ * Present on creator_campaign.closed only.
17898
+ */
17899
+ closedAt?: string;
17900
+ };
17901
+ /**
17902
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
17903
+ */
17904
+ timestamp: string;
17905
+ };
17906
+
17907
+ export type event33 = 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
16708
17908
 
16709
17909
  /**
16710
17910
  * Webhook payload for post.external.created / post.external.updated /
@@ -16741,7 +17941,7 @@ export type WebhookPayloadExternalPost = {
16741
17941
  timestamp: string;
16742
17942
  };
16743
17943
 
16744
- export type event30 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
17944
+ export type event34 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
16745
17945
 
16746
17946
  /**
16747
17947
  * Webhook payload for file.created, file.updated and file.deleted. Carries the provider file id and the change only; read the file with `GET /v1/files/{id}`.
@@ -16768,7 +17968,7 @@ export type WebhookPayloadFile = {
16768
17968
  timestamp: string;
16769
17969
  };
16770
17970
 
16771
- export type event31 = 'file.created' | 'file.updated' | 'file.deleted';
17971
+ export type event35 = 'file.created' | 'file.updated' | 'file.deleted';
16772
17972
 
16773
17973
  /**
16774
17974
  * Webhook payload for file.picked: the user picked files on a hosted picker page (`POST /v1/files/picker-sessions`), so the app may now open them. Every id was checked against Drive before the event fired.
@@ -16803,7 +18003,7 @@ export type WebhookPayloadFilePicked = {
16803
18003
  timestamp: string;
16804
18004
  };
16805
18005
 
16806
- export type event32 = 'file.picked';
18006
+ export type event36 = 'file.picked';
16807
18007
 
16808
18008
  /**
16809
18009
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -16883,9 +18083,9 @@ export type WebhookPayloadLead = {
16883
18083
  timestamp: string;
16884
18084
  };
16885
18085
 
16886
- export type event33 = 'lead.received';
18086
+ export type event37 = 'lead.received';
16887
18087
 
16888
- export type platform16 = 'facebook';
18088
+ export type platform17 = 'facebook';
16889
18089
 
16890
18090
  /**
16891
18091
  * Webhook payload for message received events
@@ -17486,7 +18686,7 @@ export type WebhookPayloadMessage = {
17486
18686
  timestamp: string;
17487
18687
  };
17488
18688
 
17489
- export type event34 = 'message.received';
18689
+ export type event38 = 'message.received';
17490
18690
 
17491
18691
  /**
17492
18692
  * Which Zernio surface produced the message. Always present and
@@ -17552,7 +18752,7 @@ export type WebhookPayloadMessageDeleted = {
17552
18752
  timestamp: string;
17553
18753
  };
17554
18754
 
17555
- export type event35 = 'message.deleted';
18755
+ export type event39 = 'message.deleted';
17556
18756
 
17557
18757
  /**
17558
18758
  * Shared payload for message.delivered, message.read, message.played and
@@ -17620,7 +18820,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
17620
18820
  timestamp: string;
17621
18821
  };
17622
18822
 
17623
- export type event36 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
18823
+ export type event40 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
17624
18824
 
17625
18825
  /**
17626
18826
  * Webhook payload for message.edited events. Fires when the sender
@@ -17663,7 +18863,7 @@ export type WebhookPayloadMessageEdited = {
17663
18863
  timestamp: string;
17664
18864
  };
17665
18865
 
17666
- export type event37 = 'message.edited';
18866
+ export type event41 = 'message.edited';
17667
18867
 
17668
18868
  /**
17669
18869
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -17909,12 +19109,12 @@ export type WebhookPayloadMessageSent = {
17909
19109
  timestamp: string;
17910
19110
  };
17911
19111
 
17912
- export type event38 = 'message.sent';
19112
+ export type event42 = 'message.sent';
17913
19113
 
17914
19114
  /**
17915
19115
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
17916
19116
  */
17917
- export type platform17 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
19117
+ export type platform18 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
17918
19118
 
17919
19119
  /**
17920
19120
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts); meta_business_agent when Meta Business Agent answered on the number. Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
@@ -17967,7 +19167,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
17967
19167
  timestamp: string;
17968
19168
  };
17969
19169
 
17970
- export type event39 = 'phone_number.stock_available';
19170
+ export type event43 = 'phone_number.stock_available';
17971
19171
 
17972
19172
  /**
17973
19173
  * Webhook payload for post events
@@ -18022,7 +19222,71 @@ export type WebhookPayloadPost = {
18022
19222
  timestamp: string;
18023
19223
  };
18024
19224
 
18025
- export type event40 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
19225
+ export type event44 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
19226
+
19227
+ /**
19228
+ * Webhook payload for `post.authenticity_changed`. Fired when a tracked post's
19229
+ * authenticity score crosses 40 in either direction while its window is open.
19230
+ * A post's first score never fires it.
19231
+ *
19232
+ */
19233
+ export type WebhookPayloadPostAuthenticityChanged = {
19234
+ /**
19235
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
19236
+ */
19237
+ id: string;
19238
+ profiles?: WebhookProfiles;
19239
+ /**
19240
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
19241
+ */
19242
+ test?: boolean;
19243
+ event: 'post.authenticity_changed';
19244
+ post: {
19245
+ /**
19246
+ * Zernio's id for the tracked post
19247
+ */
19248
+ id: string;
19249
+ platform: string;
19250
+ /**
19251
+ * The post's id on the platform
19252
+ */
19253
+ platformPostId: string;
19254
+ /**
19255
+ * The connected account the post belongs to
19256
+ */
19257
+ accountId: string;
19258
+ /**
19259
+ * The profile that account belongs to
19260
+ */
19261
+ profileId: string;
19262
+ };
19263
+ authenticity: {
19264
+ /**
19265
+ * 0 to 100, higher is more authentic
19266
+ */
19267
+ score: number;
19268
+ previousScore: number;
19269
+ /**
19270
+ * 0 to 1, how much data the score rests on
19271
+ */
19272
+ confidence: number;
19273
+ reasons: Array<{
19274
+ code: string;
19275
+ weight: number;
19276
+ }>;
19277
+ /**
19278
+ * Scoring model version
19279
+ */
19280
+ version: string;
19281
+ computedAt: string;
19282
+ };
19283
+ /**
19284
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
19285
+ */
19286
+ timestamp: string;
19287
+ };
19288
+
19289
+ export type event45 = 'post.authenticity_changed';
18026
19290
 
18027
19291
  /**
18028
19292
  * Webhook payload for the per-platform terminal events
@@ -18146,12 +19410,79 @@ export type WebhookPayloadPostPlatform = {
18146
19410
  timestamp: string;
18147
19411
  };
18148
19412
 
18149
- export type event41 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
19413
+ export type event46 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
18150
19414
 
18151
19415
  /**
18152
19416
  * Terminal status this event fires on. Matches the event suffix.
18153
19417
  */
18154
- export type status45 = 'published' | 'failed' | 'deleted';
19418
+ export type status54 = 'published' | 'failed' | 'deleted';
19419
+
19420
+ /**
19421
+ * Webhook payload for `post.tracking_completed`. Fired once when a post's tracking
19422
+ * window ends and its final analytics read has run. `final` holds the closing
19423
+ * metrics, or is null when no sample could be read. `window.completionReason` says
19424
+ * how the window closed: `final_read` (read succeeded), `unreachable` (the sync
19425
+ * failed or no sample exists) or `post_deleted` (the post is gone from the platform;
19426
+ * `final` is then the last sample we held, if any).
19427
+ *
19428
+ */
19429
+ export type WebhookPayloadPostTrackingCompleted = {
19430
+ /**
19431
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
19432
+ */
19433
+ id: string;
19434
+ profiles?: WebhookProfiles;
19435
+ /**
19436
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
19437
+ */
19438
+ test?: boolean;
19439
+ event: 'post.tracking_completed';
19440
+ post: {
19441
+ /**
19442
+ * Zernio's id for the tracked post
19443
+ */
19444
+ id: string;
19445
+ platform: string;
19446
+ /**
19447
+ * The post's id on the platform
19448
+ */
19449
+ platformPostId: string;
19450
+ /**
19451
+ * The connected account the post belongs to
19452
+ */
19453
+ accountId: string;
19454
+ /**
19455
+ * The profile that account belongs to
19456
+ */
19457
+ profileId: string;
19458
+ };
19459
+ window: {
19460
+ id: string;
19461
+ startsAt: string;
19462
+ endsAt: string;
19463
+ finalReadAt: string;
19464
+ completionReason: 'final_read' | 'unreachable' | 'post_deleted';
19465
+ };
19466
+ /**
19467
+ * The closing metrics, or null when none could be read.
19468
+ */
19469
+ final: {
19470
+ views: number;
19471
+ likes: number;
19472
+ comments: number;
19473
+ shares: number;
19474
+ saves: number;
19475
+ syncedAt: string;
19476
+ } | null;
19477
+ /**
19478
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
19479
+ */
19480
+ timestamp: string;
19481
+ };
19482
+
19483
+ export type event47 = 'post.tracking_completed';
19484
+
19485
+ export type completionReason2 = 'final_read' | 'unreachable' | 'post_deleted';
18155
19486
 
18156
19487
  /**
18157
19488
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -18211,7 +19542,7 @@ export type WebhookPayloadReaction = {
18211
19542
  timestamp: string;
18212
19543
  };
18213
19544
 
18214
- export type event42 = 'reaction.received';
19545
+ export type event48 = 'reaction.received';
18215
19546
 
18216
19547
  export type action = 'added' | 'removed';
18217
19548
 
@@ -18290,7 +19621,7 @@ export type WebhookPayloadReferral = {
18290
19621
  timestamp: string;
18291
19622
  };
18292
19623
 
18293
- export type event43 = 'referral.received';
19624
+ export type event49 = 'referral.received';
18294
19625
 
18295
19626
  /**
18296
19627
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -18322,7 +19653,7 @@ export type WebhookPayloadReviewNew = {
18322
19653
  timestamp: string;
18323
19654
  };
18324
19655
 
18325
- export type event44 = 'review.new';
19656
+ export type event50 = 'review.new';
18326
19657
 
18327
19658
  /**
18328
19659
  * Webhook payload for the review.updated event. Fired when the reviewer edits their
@@ -18360,7 +19691,7 @@ export type WebhookPayloadReviewUpdated = {
18360
19691
  timestamp: string;
18361
19692
  };
18362
19693
 
18363
- export type event45 = 'review.updated';
19694
+ export type event51 = 'review.updated';
18364
19695
 
18365
19696
  export type WebhookPayloadSequenceEnrollment = {
18366
19697
  /**
@@ -18393,7 +19724,7 @@ export type WebhookPayloadSequenceEnrollment = {
18393
19724
  exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
18394
19725
  };
18395
19726
 
18396
- export type event46 = 'sequence.enrolled' | 'sequence.exited';
19727
+ export type event52 = 'sequence.enrolled' | 'sequence.exited';
18397
19728
 
18398
19729
  /**
18399
19730
  * sequence.exited only. completed: the last step was sent; replied: the contact replied and the sequence exits on reply; manual: unenrolled through the API; failed: the step kept failing to send; unsubscribed: the contact opted out.
@@ -18414,7 +19745,7 @@ export type WebhookPayloadSupportRun = {
18414
19745
  run: SupportRun;
18415
19746
  };
18416
19747
 
18417
- export type event47 = 'support.run.completed' | 'support.run.failed';
19748
+ export type event53 = 'support.run.completed' | 'support.run.failed';
18418
19749
 
18419
19750
  /**
18420
19751
  * Webhook payload for test deliveries
@@ -18435,7 +19766,7 @@ export type WebhookPayloadTest = {
18435
19766
  timestamp: string;
18436
19767
  };
18437
19768
 
18438
- export type event48 = 'webhook.test';
19769
+ export type event54 = 'webhook.test';
18439
19770
 
18440
19771
  /**
18441
19772
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -18487,9 +19818,9 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
18487
19818
  timestamp: string;
18488
19819
  };
18489
19820
 
18490
- export type event49 = 'whatsapp.account.alert_received';
19821
+ export type event55 = 'whatsapp.account.alert_received';
18491
19822
 
18492
- export type platform18 = 'whatsapp';
19823
+ export type platform19 = 'whatsapp';
18493
19824
 
18494
19825
  /**
18495
19826
  * Webhook payload for the `whatsapp.account.name_status_updated` event.
@@ -18543,12 +19874,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
18543
19874
  timestamp: string;
18544
19875
  };
18545
19876
 
18546
- export type event50 = 'whatsapp.account.name_status_updated';
19877
+ export type event56 = 'whatsapp.account.name_status_updated';
18547
19878
 
18548
19879
  /**
18549
19880
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
18550
19881
  */
18551
- export type status46 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
19882
+ export type status55 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
18552
19883
 
18553
19884
  /**
18554
19885
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -18601,7 +19932,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
18601
19932
  timestamp: string;
18602
19933
  };
18603
19934
 
18604
- export type event51 = 'whatsapp.account.quality_updated';
19935
+ export type event57 = 'whatsapp.account.quality_updated';
18605
19936
 
18606
19937
  /**
18607
19938
  * The Meta webhook field that reported the change.
@@ -18677,12 +20008,12 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
18677
20008
  timestamp: string;
18678
20009
  };
18679
20010
 
18680
- export type event52 = 'whatsapp.account.status_updated';
20011
+ export type event58 = 'whatsapp.account.status_updated';
18681
20012
 
18682
20013
  /**
18683
20014
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
18684
20015
  */
18685
- export type status47 = 'restricted' | 'active';
20016
+ export type status56 = 'restricted' | 'active';
18686
20017
 
18687
20018
  /**
18688
20019
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -18734,12 +20065,12 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
18734
20065
  timestamp: string;
18735
20066
  };
18736
20067
 
18737
- export type event53 = 'whatsapp.contact.identity_changed';
20068
+ export type event59 = 'whatsapp.contact.identity_changed';
18738
20069
 
18739
20070
  /**
18740
20071
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
18741
20072
  */
18742
- export type reason2 = 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
20073
+ export type reason3 = 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
18743
20074
 
18744
20075
  /**
18745
20076
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -18808,7 +20139,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
18808
20139
  timestamp: string;
18809
20140
  };
18810
20141
 
18811
- export type event54 = 'whatsapp.template.category_updated';
20142
+ export type event60 = 'whatsapp.template.category_updated';
18812
20143
 
18813
20144
  /**
18814
20145
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -18890,7 +20221,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
18890
20221
  timestamp: string;
18891
20222
  };
18892
20223
 
18893
- export type event55 = 'whatsapp.template.status_updated';
20224
+ export type event61 = 'whatsapp.template.status_updated';
18894
20225
 
18895
20226
  /**
18896
20227
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -18898,7 +20229,7 @@ export type event55 = 'whatsapp.template.status_updated';
18898
20229
  * request before the template is actually removed.
18899
20230
  *
18900
20231
  */
18901
- export type status48 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
20232
+ export type status57 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
18902
20233
 
18903
20234
  export type WebhookPayloadWorkflowRun = {
18904
20235
  /**
@@ -18957,12 +20288,12 @@ export type WebhookPayloadWorkflowRun = {
18957
20288
  error?: string;
18958
20289
  };
18959
20290
 
18960
- export type event56 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
20291
+ export type event62 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
18961
20292
 
18962
20293
  /**
18963
20294
  * running on workflow.run.started; completed or exited (ended on purpose before the last node, e.g. a handoff) on workflow.run.completed; failed on workflow.run.failed.
18964
20295
  */
18965
- export type status49 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
20296
+ export type status58 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
18966
20297
 
18967
20298
  /**
18968
20299
  * The profiles this event belongs to, each with the externalId you set on it (null when none is set). Present on every event tied to a profile and absent on events that belong to none. Events spanning several profiles (a post published to accounts of different profiles) list each once. Use it to route the event to your tenant without storing Zernio profile ids.
@@ -19235,7 +20566,7 @@ export type WhatsAppTemplateButton = {
19235
20566
  navigate_screen?: string;
19236
20567
  };
19237
20568
 
19238
- export type type21 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
20569
+ export type type23 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
19239
20570
 
19240
20571
  /**
19241
20572
  * Required when type is otp
@@ -19277,9 +20608,9 @@ export type WhatsAppTemplateLookupError = {
19277
20608
  };
19278
20609
  };
19279
20610
 
19280
- export type type22 = 'platform_error';
20611
+ export type type24 = 'platform_error';
19281
20612
 
19282
- export type code2 = 'platform_api_error';
20613
+ export type code3 = 'platform_api_error';
19283
20614
 
19284
20615
  export type phase = 'template_lookup';
19285
20616
 
@@ -19360,7 +20691,7 @@ export type WorkflowExecutionEvent = {
19360
20691
 
19361
20692
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
19362
20693
 
19363
- export type status50 = 'success' | 'failed' | 'pending';
20694
+ export type status59 = 'success' | 'failed' | 'pending';
19364
20695
 
19365
20696
  /**
19366
20697
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -19442,7 +20773,7 @@ export type WorkflowNode = {
19442
20773
  * integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
19443
20774
  *
19444
20775
  */
19445
- export type type23 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
20776
+ export type type25 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
19446
20777
 
19447
20778
  /**
19448
20779
  * A single X API operation with its per-call price and the Zernio platform methods that trigger it.
@@ -19562,7 +20893,7 @@ export type XArticle = {
19562
20893
  /**
19563
20894
  * Publish creates an X Article draft and then publishes it. Draft stops after draft creation and returns the X draft ID without a public URL.
19564
20895
  */
19565
- export type mode2 = 'publish' | 'draft';
20896
+ export type mode3 = 'publish' | 'draft';
19566
20897
 
19567
20898
  export type XArticleBlock = {
19568
20899
  type: 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
@@ -19578,7 +20909,7 @@ export type XArticleBlock = {
19578
20909
  entity_ranges?: Array<XArticleEntityRange>;
19579
20910
  };
19580
20911
 
19581
- export type type24 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
20912
+ export type type26 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
19582
20913
 
19583
20914
  /**
19584
20915
  * X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
@@ -19657,7 +20988,7 @@ export type XArticleEntity = {
19657
20988
 
19658
20989
  export type mutability = 'immutable' | 'mutable' | 'segmented';
19659
20990
 
19660
- export type type25 = 'divider' | 'latex';
20991
+ export type type27 = 'divider' | 'latex';
19661
20992
 
19662
20993
  /**
19663
20994
  * The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
@@ -21176,195 +22507,1182 @@ export type GetPostingFrequencyError = (ErrorResponse | {
21176
22507
  requiresAddon?: boolean;
21177
22508
  });
21178
22509
 
21179
- export type GetPostTimelineData = {
22510
+ export type GetLedgerBalancesData = {
21180
22511
  query: {
21181
22512
  /**
21182
- * Start of date range (ISO 8601). Defaults to 90 days ago.
22513
+ * Lowercase ISO 4217 currency code.
21183
22514
  */
21184
- fromDate?: string;
22515
+ currency?: string;
21185
22516
  /**
21186
- * The post to fetch timeline for. Accepts an ExternalPost ID, a platformPostId, or a Zernio Post ID.
21187
- *
22517
+ * Scope identifier.
21188
22518
  */
21189
- postId: string;
22519
+ scopeId: string;
21190
22520
  /**
21191
- * End of date range (ISO 8601). Defaults to now.
22521
+ * Scope type, for example participant or campaign.
21192
22522
  */
21193
- toDate?: string;
22523
+ scopeType: string;
21194
22524
  };
21195
22525
  };
21196
22526
 
21197
- export type GetPostTimelineResponse = ({
22527
+ export type GetLedgerBalancesResponse = ({
22528
+ scopeType?: string;
22529
+ scopeId?: string;
22530
+ currency?: string;
21198
22531
  /**
21199
- * The postId that was requested
22532
+ * Bucket name to balance in cents (credits minus debits)
21200
22533
  */
21201
- postId?: string;
21202
- timeline?: Array<{
21203
- /**
21204
- * Date in YYYY-MM-DD format
21205
- */
21206
- date?: string;
22534
+ balances?: {
22535
+ [key: string]: (number);
22536
+ };
22537
+ });
22538
+
22539
+ export type GetLedgerBalancesError = (ErrorResponse | {
22540
+ error?: string;
22541
+ code?: 'insufficient_permissions' | 'unclassified_resource';
22542
+ /**
22543
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
22544
+ */
22545
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
22546
+ });
22547
+
22548
+ export type ListLedgerEntriesData = {
22549
+ query?: {
22550
+ kind?: 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
22551
+ limit?: number;
22552
+ referenceId?: string;
22553
+ referenceType?: string;
22554
+ scopeId?: string;
22555
+ scopeType?: string;
22556
+ skip?: number;
22557
+ };
22558
+ };
22559
+
22560
+ export type ListLedgerEntriesResponse = ({
22561
+ entries?: Array<{
22562
+ id?: string;
22563
+ kind?: 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
22564
+ /**
22565
+ * Always positive; direction is given by debit and credit
22566
+ */
22567
+ amountCents?: number;
22568
+ debit?: LedgerAccountSide;
22569
+ credit?: LedgerAccountSide;
22570
+ holdUntil?: (string) | null;
22571
+ releasedByEntryId?: (string) | null;
22572
+ referenceType?: (string) | null;
22573
+ referenceId?: (string) | null;
22574
+ reversesEntryId?: (string) | null;
22575
+ cause?: string;
22576
+ actor?: string;
22577
+ createdAt?: string;
22578
+ }>;
22579
+ pagination?: {
22580
+ total?: number;
22581
+ limit?: number;
22582
+ skip?: number;
22583
+ };
22584
+ });
22585
+
22586
+ export type ListLedgerEntriesError = (ErrorResponse | {
22587
+ error?: string;
22588
+ code?: 'insufficient_permissions' | 'unclassified_resource';
22589
+ /**
22590
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
22591
+ */
22592
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
22593
+ });
22594
+
22595
+ export type GetBalanceResponse = ({
22596
+ /**
22597
+ * Balance you can transfer now. Negative after a dispute or refund of a top-up that was already spent; transfers are refused while it is negative.
22598
+ */
22599
+ availableCents?: number;
22600
+ /**
22601
+ * Paid card top-ups still on hold. Card top-ups become available after 7 days.
22602
+ */
22603
+ pendingCents?: number;
22604
+ /**
22605
+ * Card top-ups on hold, each with the time it becomes available.
22606
+ */
22607
+ pendingReleases?: Array<{
22608
+ topupId: string;
21207
22609
  /**
21208
- * Platform name (e.g. instagram, tiktok)
22610
+ * Net amount that moves to availableCents.
21209
22611
  */
21210
- platform?: string;
22612
+ amountCents: number;
22613
+ availableAt: string;
22614
+ }>;
22615
+ /**
22616
+ * Top-ups started but not paid yet.
22617
+ */
22618
+ pendingTopupCents?: number;
22619
+ currency?: 'usd';
22620
+ recentTopups?: Array<TreasuryTopup>;
22621
+ });
22622
+
22623
+ export type GetBalanceError = ({
22624
+ /**
22625
+ * Human-readable error message suitable for end-user display.
22626
+ */
22627
+ error: string;
22628
+ /**
22629
+ * Machine-readable error code. Stable across versions.
22630
+ */
22631
+ code: 'PAYMENT_REQUIRED';
22632
+ /**
22633
+ * Discriminator for which gate fired.
22634
+ */
22635
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
22636
+ /**
22637
+ * Link to the relevant documentation page.
22638
+ */
22639
+ documentation_url?: string;
22640
+ /**
22641
+ * Deep-link to send the end-user to. For
22642
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
22643
+ * the add-payment-method drawer on the Zernio billing page.
22644
+ * For `enterprise_required` this is the Zernio enterprise
22645
+ * contact page.
22646
+ *
22647
+ */
22648
+ dashboard_url?: string;
22649
+ /**
22650
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
22651
+ */
22652
+ details?: {
21211
22653
  /**
21212
- * Platform-specific post ID
22654
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
21213
22655
  */
21214
- platformPostId?: string;
22656
+ free_tier_account_limit?: number;
21215
22657
  /**
21216
- * Total impressions on this date
22658
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
21217
22659
  */
21218
- impressions?: number;
22660
+ current_account_count?: number;
21219
22661
  /**
21220
- * Total reach on this date
22662
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
21221
22663
  */
21222
- reach?: number;
22664
+ has_payment_method?: boolean;
21223
22665
  /**
21224
- * Total likes on this date
22666
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
21225
22667
  */
21226
- likes?: number;
22668
+ verification_amount_cents?: number;
21227
22669
  /**
21228
- * Total comments on this date
22670
+ * The negotiated connected-account cap from the
22671
+ * team's enterprise contract. Self-service teams
22672
+ * have no cap and never receive this reason. Only
22673
+ * set when reason=enterprise_required.
22674
+ *
21229
22675
  */
21230
- comments?: number;
22676
+ effective_account_limit?: number;
22677
+ };
22678
+ } | {
22679
+ error?: string;
22680
+ code?: 'insufficient_permissions' | 'unclassified_resource';
22681
+ /**
22682
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
22683
+ */
22684
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
22685
+ });
22686
+
22687
+ export type CreateTopupData = {
22688
+ body: {
21231
22689
  /**
21232
- * Total shares on this date
22690
+ * Amount in cents, minimum $10
21233
22691
  */
21234
- shares?: number;
22692
+ amountCents: number;
21235
22693
  /**
21236
- * Total saves on this date
22694
+ * Only card is available. bank_transfer returns 400 "Bank transfers are not available yet."
21237
22695
  */
21238
- saves?: number;
22696
+ method: 'card' | 'bank_transfer';
22697
+ };
22698
+ headers?: {
21239
22699
  /**
21240
- * Total clicks on this date
22700
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
21241
22701
  */
21242
- clicks?: number;
22702
+ 'Idempotency-Key'?: string;
22703
+ };
22704
+ };
22705
+
22706
+ export type CreateTopupResponse = ({
22707
+ topupId?: string;
22708
+ /**
22709
+ * Stripe Checkout URL to send the payer to
22710
+ */
22711
+ url?: string;
22712
+ });
22713
+
22714
+ export type CreateTopupError = (ErrorResponse | {
22715
+ /**
22716
+ * Human-readable error message suitable for end-user display.
22717
+ */
22718
+ error: string;
22719
+ /**
22720
+ * Machine-readable error code. Stable across versions.
22721
+ */
22722
+ code: 'PAYMENT_REQUIRED';
22723
+ /**
22724
+ * Discriminator for which gate fired.
22725
+ */
22726
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
22727
+ /**
22728
+ * Link to the relevant documentation page.
22729
+ */
22730
+ documentation_url?: string;
22731
+ /**
22732
+ * Deep-link to send the end-user to. For
22733
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
22734
+ * the add-payment-method drawer on the Zernio billing page.
22735
+ * For `enterprise_required` this is the Zernio enterprise
22736
+ * contact page.
22737
+ *
22738
+ */
22739
+ dashboard_url?: string;
22740
+ /**
22741
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
22742
+ */
22743
+ details?: {
21243
22744
  /**
21244
- * Total views on this date
22745
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
21245
22746
  */
21246
- views?: number;
22747
+ free_tier_account_limit?: number;
21247
22748
  /**
21248
- * Follows attributed to the post on this date (Instagram feed and stories, Facebook Reels, TikTok business lane). Null on Instagram Reels and video and on Facebook posts that are not Reels, where Meta has no follows metric; 0 on other platforms.
22749
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
21249
22750
  */
21250
- follows?: (number) | null;
22751
+ current_account_count?: number;
21251
22752
  /**
21252
- * TikTok business lane: share of viewers who watched to the end on this date, 0 to 1; 0 elsewhere
22753
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
21253
22754
  */
21254
- completionRate?: number;
22755
+ has_payment_method?: boolean;
21255
22756
  /**
21256
- * Instagram feed posts (images and carousels; 0 on Reels and Stories) and TikTok business lane: profile views attributed to the post on this date; 0 elsewhere
22757
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
21257
22758
  */
21258
- profileViews?: number;
22759
+ verification_amount_cents?: number;
21259
22760
  /**
21260
- * TikTok business lane: website-link clicks attributed to the post on this date (also inside clicks); 0 elsewhere
22761
+ * The negotiated connected-account cap from the
22762
+ * team's enterprise contract. Self-service teams
22763
+ * have no cap and never receive this reason. Only
22764
+ * set when reason=enterprise_required.
22765
+ *
21261
22766
  */
21262
- websiteClicks?: number;
22767
+ effective_account_limit?: number;
22768
+ };
22769
+ } | unknown);
22770
+
22771
+ export type ListTopupsData = {
22772
+ query?: {
22773
+ limit?: number;
22774
+ skip?: number;
22775
+ };
22776
+ };
22777
+
22778
+ export type ListTopupsResponse = ({
22779
+ topups?: Array<TreasuryTopup>;
22780
+ });
22781
+
22782
+ export type ListTopupsError = (ErrorResponse | {
22783
+ /**
22784
+ * Human-readable error message suitable for end-user display.
22785
+ */
22786
+ error: string;
22787
+ /**
22788
+ * Machine-readable error code. Stable across versions.
22789
+ */
22790
+ code: 'PAYMENT_REQUIRED';
22791
+ /**
22792
+ * Discriminator for which gate fired.
22793
+ */
22794
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
22795
+ /**
22796
+ * Link to the relevant documentation page.
22797
+ */
22798
+ documentation_url?: string;
22799
+ /**
22800
+ * Deep-link to send the end-user to. For
22801
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
22802
+ * the add-payment-method drawer on the Zernio billing page.
22803
+ * For `enterprise_required` this is the Zernio enterprise
22804
+ * contact page.
22805
+ *
22806
+ */
22807
+ dashboard_url?: string;
22808
+ /**
22809
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
22810
+ */
22811
+ details?: {
21263
22812
  /**
21264
- * TikTok business lane: share of views by surface on this date (forYou, follow, search, personalProfile, sound, directMessage, other), fractions 0 to 1; empty object elsewhere
22813
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
21265
22814
  */
21266
- impressionSources?: {
21267
- [key: string]: (number);
21268
- };
22815
+ free_tier_account_limit?: number;
21269
22816
  /**
21270
- * TikTok business lane: follower / nonFollower and newViewer / returnViewer shares on this date, fractions 0 to 1; empty object elsewhere
22817
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
21271
22818
  */
21272
- audienceTypes?: {
21273
- [key: string]: (number);
21274
- };
22819
+ current_account_count?: number;
21275
22820
  /**
21276
- * TikTok business lane: viewer-country shares on this date keyed by ISO-3166 alpha-2, fractions 0 to 1, top 20 with the tail in `other`; empty object elsewhere
22821
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
21277
22822
  */
21278
- audienceCountries?: {
21279
- [key: string]: (number);
21280
- };
22823
+ has_payment_method?: boolean;
21281
22824
  /**
21282
- * Facebook Reels only: plays that were replays, as of this date; 0 elsewhere
22825
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
21283
22826
  */
21284
- replays?: number;
22827
+ verification_amount_cents?: number;
21285
22828
  /**
21286
- * Facebook Reels and TikTok business lane: share still watching at each second of playback, fractions 0 to 1. Facebook Reels (Meta post_video_retention_graph): the base is a subset of plays that Meta selects and does not expose: on small Reels it can be far below views (6 of 51 measured), so a value is a share of that subset, not of all plays. Keys are whole seconds from the start of a play ("3" is the share still watching at 3 s). Loops count as continued playback, so a short Reels curve runs past its length (an 8 s Reel has keys "0" to "12"); Meta returns at most 41 points, so a long Reel covers only its first 40 s. TikTok accounts connected through the TikTok for Business app also fill it from TikTok video_view_retention: share still watching at each whole second, fractions 0 to 1, at most 61 points, thinned evenly on videos longer than 60 s. Values are as of this date; empty object for other media and platforms.
22829
+ * The negotiated connected-account cap from the
22830
+ * team's enterprise contract. Self-service teams
22831
+ * have no cap and never receive this reason. Only
22832
+ * set when reason=enterprise_required.
22833
+ *
21287
22834
  */
21288
- retentionCurve?: {
21289
- [key: string]: (number);
21290
- };
21291
- }>;
22835
+ effective_account_limit?: number;
22836
+ };
22837
+ } | {
22838
+ error?: string;
22839
+ code?: 'insufficient_permissions' | 'unclassified_resource';
22840
+ /**
22841
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
22842
+ */
22843
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
21292
22844
  });
21293
22845
 
21294
- export type GetPostTimelineError = ({
21295
- error?: string;
21296
- } | ErrorResponse | {
21297
- error?: string;
21298
- code?: string;
22846
+ export type GetTopupReceiptData = {
22847
+ path: {
22848
+ topupId: string;
22849
+ };
22850
+ };
22851
+
22852
+ export type GetTopupReceiptResponse = ({
22853
+ url: string;
22854
+ format: 'pdf' | 'page';
21299
22855
  });
21300
22856
 
21301
- export type RunGoogleAnalyticsReportData = {
21302
- body: (GoogleAnalyticsReportFields & {
22857
+ export type GetTopupReceiptError = (ErrorResponse | {
21303
22858
  /**
21304
- * Defaults to the last 28 days (`28daysAgo` to `yesterday`).
22859
+ * Human-readable error message suitable for end-user display.
21305
22860
  */
21306
- dateRanges?: Array<{
22861
+ error: string;
22862
+ /**
22863
+ * Machine-readable error code. Stable across versions.
22864
+ */
22865
+ code: 'PAYMENT_REQUIRED';
22866
+ /**
22867
+ * Discriminator for which gate fired.
22868
+ */
22869
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
22870
+ /**
22871
+ * Link to the relevant documentation page.
22872
+ */
22873
+ documentation_url?: string;
22874
+ /**
22875
+ * Deep-link to send the end-user to. For
22876
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
22877
+ * the add-payment-method drawer on the Zernio billing page.
22878
+ * For `enterprise_required` this is the Zernio enterprise
22879
+ * contact page.
22880
+ *
22881
+ */
22882
+ dashboard_url?: string;
22883
+ /**
22884
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
22885
+ */
22886
+ details?: {
21307
22887
  /**
21308
- * YYYY-MM-DD, today, yesterday or NdaysAgo.
22888
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
21309
22889
  */
21310
- startDate: string;
22890
+ free_tier_account_limit?: number;
21311
22891
  /**
21312
- * YYYY-MM-DD, today, yesterday or NdaysAgo.
22892
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
21313
22893
  */
21314
- endDate: string;
21315
- name?: string;
21316
- }>;
21317
- /**
21318
- * Row offset for paging through a report larger than `limit`.
21319
- */
21320
- offset?: number;
21321
- keepEmptyRows?: boolean;
22894
+ current_account_count?: number;
22895
+ /**
22896
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
22897
+ */
22898
+ has_payment_method?: boolean;
22899
+ /**
22900
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
22901
+ */
22902
+ verification_amount_cents?: number;
22903
+ /**
22904
+ * The negotiated connected-account cap from the
22905
+ * team's enterprise contract. Self-service teams
22906
+ * have no cap and never receive this reason. Only
22907
+ * set when reason=enterprise_required.
22908
+ *
22909
+ */
22910
+ effective_account_limit?: number;
22911
+ };
22912
+ } | {
22913
+ error?: string;
22914
+ code?: 'insufficient_permissions' | 'unclassified_resource';
21322
22915
  /**
21323
- * ISO 4217 code for currency metrics. Defaults to the property currency.
22916
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
21324
22917
  */
21325
- currencyCode?: string;
21326
- });
21327
- };
21328
-
21329
- export type RunGoogleAnalyticsReportResponse = (GoogleAnalyticsReport);
21330
-
21331
- export type RunGoogleAnalyticsReportError = (ErrorResponse | unknown | {
22918
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
22919
+ } | {
21332
22920
  error?: string;
21333
22921
  });
21334
22922
 
21335
- export type RunGoogleAnalyticsRealtimeReportData = {
21336
- body: (GoogleAnalyticsReportFields & {
21337
- minuteRanges?: Array<{
21338
- startMinutesAgo?: number;
21339
- endMinutesAgo?: number;
21340
- name?: string;
21341
- }>;
21342
- });
21343
- };
21344
-
21345
- export type RunGoogleAnalyticsRealtimeReportResponse = (GoogleAnalyticsReport);
21346
-
21347
- export type RunGoogleAnalyticsRealtimeReportError = (ErrorResponse | unknown | {
21348
- error?: string;
22923
+ export type ListPayeesResponse = ({
22924
+ payees?: Array<TreasuryPayee>;
21349
22925
  });
21350
22926
 
21351
- export type GetGoogleAnalyticsMetadataData = {
21352
- query: {
21353
- /**
21354
- * Zernio account ID of the Google Analytics connection.
21355
- */
21356
- accountId: string;
21357
- };
21358
- };
21359
-
21360
- export type GetGoogleAnalyticsMetadataResponse = ({
21361
- accountId?: string;
21362
- propertyId?: string;
21363
- dimensions?: Array<{
21364
- apiName?: string;
21365
- uiName?: string;
21366
- description?: string;
21367
- category?: string;
22927
+ export type ListPayeesError = ({
22928
+ /**
22929
+ * Human-readable error message suitable for end-user display.
22930
+ */
22931
+ error: string;
22932
+ /**
22933
+ * Machine-readable error code. Stable across versions.
22934
+ */
22935
+ code: 'PAYMENT_REQUIRED';
22936
+ /**
22937
+ * Discriminator for which gate fired.
22938
+ */
22939
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
22940
+ /**
22941
+ * Link to the relevant documentation page.
22942
+ */
22943
+ documentation_url?: string;
22944
+ /**
22945
+ * Deep-link to send the end-user to. For
22946
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
22947
+ * the add-payment-method drawer on the Zernio billing page.
22948
+ * For `enterprise_required` this is the Zernio enterprise
22949
+ * contact page.
22950
+ *
22951
+ */
22952
+ dashboard_url?: string;
22953
+ /**
22954
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
22955
+ */
22956
+ details?: {
22957
+ /**
22958
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
22959
+ */
22960
+ free_tier_account_limit?: number;
22961
+ /**
22962
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
22963
+ */
22964
+ current_account_count?: number;
22965
+ /**
22966
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
22967
+ */
22968
+ has_payment_method?: boolean;
22969
+ /**
22970
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
22971
+ */
22972
+ verification_amount_cents?: number;
22973
+ /**
22974
+ * The negotiated connected-account cap from the
22975
+ * team's enterprise contract. Self-service teams
22976
+ * have no cap and never receive this reason. Only
22977
+ * set when reason=enterprise_required.
22978
+ *
22979
+ */
22980
+ effective_account_limit?: number;
22981
+ };
22982
+ } | {
22983
+ error?: string;
22984
+ code?: 'insufficient_permissions' | 'unclassified_resource';
22985
+ /**
22986
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
22987
+ */
22988
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
22989
+ });
22990
+
22991
+ export type CreatePayeeOnboardingLinkData = {
22992
+ path: {
22993
+ payeeId: string;
22994
+ };
22995
+ };
22996
+
22997
+ export type CreatePayeeOnboardingLinkResponse = ({
22998
+ url?: string;
22999
+ expiresAt?: string;
23000
+ });
23001
+
23002
+ export type CreatePayeeOnboardingLinkError = (ErrorResponse | {
23003
+ /**
23004
+ * Human-readable error message suitable for end-user display.
23005
+ */
23006
+ error: string;
23007
+ /**
23008
+ * Machine-readable error code. Stable across versions.
23009
+ */
23010
+ code: 'PAYMENT_REQUIRED';
23011
+ /**
23012
+ * Discriminator for which gate fired.
23013
+ */
23014
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
23015
+ /**
23016
+ * Link to the relevant documentation page.
23017
+ */
23018
+ documentation_url?: string;
23019
+ /**
23020
+ * Deep-link to send the end-user to. For
23021
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
23022
+ * the add-payment-method drawer on the Zernio billing page.
23023
+ * For `enterprise_required` this is the Zernio enterprise
23024
+ * contact page.
23025
+ *
23026
+ */
23027
+ dashboard_url?: string;
23028
+ /**
23029
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
23030
+ */
23031
+ details?: {
23032
+ /**
23033
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
23034
+ */
23035
+ free_tier_account_limit?: number;
23036
+ /**
23037
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
23038
+ */
23039
+ current_account_count?: number;
23040
+ /**
23041
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
23042
+ */
23043
+ has_payment_method?: boolean;
23044
+ /**
23045
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
23046
+ */
23047
+ verification_amount_cents?: number;
23048
+ /**
23049
+ * The negotiated connected-account cap from the
23050
+ * team's enterprise contract. Self-service teams
23051
+ * have no cap and never receive this reason. Only
23052
+ * set when reason=enterprise_required.
23053
+ *
23054
+ */
23055
+ effective_account_limit?: number;
23056
+ };
23057
+ } | {
23058
+ error?: string;
23059
+ code?: 'insufficient_permissions' | 'unclassified_resource';
23060
+ /**
23061
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
23062
+ */
23063
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
23064
+ } | {
23065
+ error?: string;
23066
+ });
23067
+
23068
+ export type CreateTransferData = {
23069
+ body: {
23070
+ /**
23071
+ * 24-character payee id
23072
+ */
23073
+ payeeId: string;
23074
+ /**
23075
+ * Amount the payee receives, in cents. The fee is added on top.
23076
+ */
23077
+ amountCents: number;
23078
+ reference?: {
23079
+ type: string;
23080
+ id: string;
23081
+ };
23082
+ };
23083
+ headers?: {
23084
+ /**
23085
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
23086
+ */
23087
+ 'Idempotency-Key'?: string;
23088
+ };
23089
+ };
23090
+
23091
+ export type CreateTransferResponse = (TreasuryTransfer);
23092
+
23093
+ export type CreateTransferError = (ErrorResponse | {
23094
+ /**
23095
+ * Human-readable error message suitable for end-user display.
23096
+ */
23097
+ error: string;
23098
+ /**
23099
+ * Machine-readable error code. Stable across versions.
23100
+ */
23101
+ code: 'PAYMENT_REQUIRED';
23102
+ /**
23103
+ * Discriminator for which gate fired.
23104
+ */
23105
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
23106
+ /**
23107
+ * Link to the relevant documentation page.
23108
+ */
23109
+ documentation_url?: string;
23110
+ /**
23111
+ * Deep-link to send the end-user to. For
23112
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
23113
+ * the add-payment-method drawer on the Zernio billing page.
23114
+ * For `enterprise_required` this is the Zernio enterprise
23115
+ * contact page.
23116
+ *
23117
+ */
23118
+ dashboard_url?: string;
23119
+ /**
23120
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
23121
+ */
23122
+ details?: {
23123
+ /**
23124
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
23125
+ */
23126
+ free_tier_account_limit?: number;
23127
+ /**
23128
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
23129
+ */
23130
+ current_account_count?: number;
23131
+ /**
23132
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
23133
+ */
23134
+ has_payment_method?: boolean;
23135
+ /**
23136
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
23137
+ */
23138
+ verification_amount_cents?: number;
23139
+ /**
23140
+ * The negotiated connected-account cap from the
23141
+ * team's enterprise contract. Self-service teams
23142
+ * have no cap and never receive this reason. Only
23143
+ * set when reason=enterprise_required.
23144
+ *
23145
+ */
23146
+ effective_account_limit?: number;
23147
+ };
23148
+ } | {
23149
+ error?: string;
23150
+ } | unknown);
23151
+
23152
+ export type ListTransfersData = {
23153
+ query?: {
23154
+ limit?: number;
23155
+ skip?: number;
23156
+ };
23157
+ };
23158
+
23159
+ export type ListTransfersResponse = ({
23160
+ transfers?: Array<TreasuryTransfer>;
23161
+ });
23162
+
23163
+ export type ListTransfersError = (ErrorResponse | {
23164
+ /**
23165
+ * Human-readable error message suitable for end-user display.
23166
+ */
23167
+ error: string;
23168
+ /**
23169
+ * Machine-readable error code. Stable across versions.
23170
+ */
23171
+ code: 'PAYMENT_REQUIRED';
23172
+ /**
23173
+ * Discriminator for which gate fired.
23174
+ */
23175
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
23176
+ /**
23177
+ * Link to the relevant documentation page.
23178
+ */
23179
+ documentation_url?: string;
23180
+ /**
23181
+ * Deep-link to send the end-user to. For
23182
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
23183
+ * the add-payment-method drawer on the Zernio billing page.
23184
+ * For `enterprise_required` this is the Zernio enterprise
23185
+ * contact page.
23186
+ *
23187
+ */
23188
+ dashboard_url?: string;
23189
+ /**
23190
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
23191
+ */
23192
+ details?: {
23193
+ /**
23194
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
23195
+ */
23196
+ free_tier_account_limit?: number;
23197
+ /**
23198
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
23199
+ */
23200
+ current_account_count?: number;
23201
+ /**
23202
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
23203
+ */
23204
+ has_payment_method?: boolean;
23205
+ /**
23206
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
23207
+ */
23208
+ verification_amount_cents?: number;
23209
+ /**
23210
+ * The negotiated connected-account cap from the
23211
+ * team's enterprise contract. Self-service teams
23212
+ * have no cap and never receive this reason. Only
23213
+ * set when reason=enterprise_required.
23214
+ *
23215
+ */
23216
+ effective_account_limit?: number;
23217
+ };
23218
+ } | {
23219
+ error?: string;
23220
+ code?: 'insufficient_permissions' | 'unclassified_resource';
23221
+ /**
23222
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
23223
+ */
23224
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
23225
+ });
23226
+
23227
+ export type GetTransferData = {
23228
+ path: {
23229
+ transferId: string;
23230
+ };
23231
+ };
23232
+
23233
+ export type GetTransferResponse = (TreasuryTransfer);
23234
+
23235
+ export type GetTransferError = (ErrorResponse | {
23236
+ /**
23237
+ * Human-readable error message suitable for end-user display.
23238
+ */
23239
+ error: string;
23240
+ /**
23241
+ * Machine-readable error code. Stable across versions.
23242
+ */
23243
+ code: 'PAYMENT_REQUIRED';
23244
+ /**
23245
+ * Discriminator for which gate fired.
23246
+ */
23247
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
23248
+ /**
23249
+ * Link to the relevant documentation page.
23250
+ */
23251
+ documentation_url?: string;
23252
+ /**
23253
+ * Deep-link to send the end-user to. For
23254
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
23255
+ * the add-payment-method drawer on the Zernio billing page.
23256
+ * For `enterprise_required` this is the Zernio enterprise
23257
+ * contact page.
23258
+ *
23259
+ */
23260
+ dashboard_url?: string;
23261
+ /**
23262
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
23263
+ */
23264
+ details?: {
23265
+ /**
23266
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
23267
+ */
23268
+ free_tier_account_limit?: number;
23269
+ /**
23270
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
23271
+ */
23272
+ current_account_count?: number;
23273
+ /**
23274
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
23275
+ */
23276
+ has_payment_method?: boolean;
23277
+ /**
23278
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
23279
+ */
23280
+ verification_amount_cents?: number;
23281
+ /**
23282
+ * The negotiated connected-account cap from the
23283
+ * team's enterprise contract. Self-service teams
23284
+ * have no cap and never receive this reason. Only
23285
+ * set when reason=enterprise_required.
23286
+ *
23287
+ */
23288
+ effective_account_limit?: number;
23289
+ };
23290
+ } | {
23291
+ error?: string;
23292
+ code?: 'insufficient_permissions' | 'unclassified_resource';
23293
+ /**
23294
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
23295
+ */
23296
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
23297
+ } | {
23298
+ error?: string;
23299
+ });
23300
+
23301
+ export type RecoverCreatorPortalLinksData = {
23302
+ body: {
23303
+ email: string;
23304
+ /**
23305
+ * Only send the link for this campaign.
23306
+ */
23307
+ campaignId?: string;
23308
+ };
23309
+ };
23310
+
23311
+ export type RecoverCreatorPortalLinksResponse = ({
23312
+ status: 'accepted';
23313
+ message: string;
23314
+ });
23315
+
23316
+ export type RecoverCreatorPortalLinksError = (ErrorResponse);
23317
+
23318
+ export type GetCreatorPortalData = {
23319
+ path: {
23320
+ /**
23321
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23322
+ */
23323
+ token: string;
23324
+ };
23325
+ };
23326
+
23327
+ export type GetCreatorPortalResponse = ((CreatorPortalInvite | CreatorPortalParticipant));
23328
+
23329
+ export type GetCreatorPortalError = (ErrorResponse);
23330
+
23331
+ export type JoinCreatorCampaignData = {
23332
+ body?: {
23333
+ /**
23334
+ * Required when joining through an open invite link.
23335
+ */
23336
+ displayName?: string;
23337
+ email?: string;
23338
+ };
23339
+ path: {
23340
+ /**
23341
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23342
+ */
23343
+ token: string;
23344
+ };
23345
+ };
23346
+
23347
+ export type JoinCreatorCampaignResponse = ({
23348
+ participantToken: string;
23349
+ });
23350
+
23351
+ export type JoinCreatorCampaignError = (ErrorResponse);
23352
+
23353
+ export type StartCreatorConnectData = {
23354
+ body: {
23355
+ /**
23356
+ * One of the campaign's platforms, for example tiktok.
23357
+ */
23358
+ platform: string;
23359
+ };
23360
+ path: {
23361
+ /**
23362
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23363
+ */
23364
+ token: string;
23365
+ };
23366
+ };
23367
+
23368
+ export type StartCreatorConnectResponse = ({
23369
+ authUrl: string;
23370
+ });
23371
+
23372
+ export type StartCreatorConnectError = (ErrorResponse);
23373
+
23374
+ export type SubmitCreatorPostData = {
23375
+ body: {
23376
+ /**
23377
+ * The public link to the post.
23378
+ */
23379
+ url: string;
23380
+ };
23381
+ path: {
23382
+ /**
23383
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23384
+ */
23385
+ token: string;
23386
+ };
23387
+ };
23388
+
23389
+ export type SubmitCreatorPostResponse = ({
23390
+ submission: CreatorPortalSubmission;
23391
+ });
23392
+
23393
+ export type SubmitCreatorPostError = (ErrorResponse);
23394
+
23395
+ export type GetCreatorPayoutsData = {
23396
+ path: {
23397
+ /**
23398
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23399
+ */
23400
+ token: string;
23401
+ };
23402
+ query?: {
23403
+ limit?: number;
23404
+ skip?: number;
23405
+ };
23406
+ };
23407
+
23408
+ export type GetCreatorPayoutsResponse = ({
23409
+ entries: Array<CreatorPortalPayoutEntry>;
23410
+ total: number;
23411
+ payouts: CreatorPortalPayoutSetup;
23412
+ });
23413
+
23414
+ export type GetCreatorPayoutsError = (ErrorResponse);
23415
+
23416
+ export type StartCreatorPayoutsData = {
23417
+ body: {
23418
+ action: 'onboard';
23419
+ /**
23420
+ * ISO 3166-1 alpha-2 country the creator lives in. Required on the first call.
23421
+ */
23422
+ country?: string;
23423
+ };
23424
+ path: {
23425
+ /**
23426
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23427
+ */
23428
+ token: string;
23429
+ };
23430
+ };
23431
+
23432
+ export type StartCreatorPayoutsResponse = ({
23433
+ url: string;
23434
+ });
23435
+
23436
+ export type StartCreatorPayoutsError = (ErrorResponse);
23437
+
23438
+ export type CreateCreatorPayoutLoginData = {
23439
+ path: {
23440
+ /**
23441
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23442
+ */
23443
+ token: string;
23444
+ };
23445
+ };
23446
+
23447
+ export type CreateCreatorPayoutLoginResponse = ({
23448
+ url: string;
23449
+ });
23450
+
23451
+ export type CreateCreatorPayoutLoginError = (ErrorResponse);
23452
+
23453
+ export type GetCreatorPayoutStatementData = {
23454
+ path: {
23455
+ /**
23456
+ * A participant token or an open invite token. A malformed token answers 404 like an unknown one.
23457
+ */
23458
+ token: string;
23459
+ transferId: string;
23460
+ };
23461
+ };
23462
+
23463
+ export type GetCreatorPayoutStatementResponse = ((Blob | File));
23464
+
23465
+ export type GetCreatorPayoutStatementError = (ErrorResponse);
23466
+
23467
+ export type GetPayoutBatchData = {
23468
+ path: {
23469
+ /**
23470
+ * Payout batch ID.
23471
+ */
23472
+ batchId: string;
23473
+ };
23474
+ };
23475
+
23476
+ export type GetPayoutBatchResponse = ({
23477
+ batch: PayoutBatch;
23478
+ });
23479
+
23480
+ export type GetPayoutBatchError = (ErrorResponse);
23481
+
23482
+ export type CancelPayoutBatchData = {
23483
+ path: {
23484
+ /**
23485
+ * Payout batch ID.
23486
+ */
23487
+ batchId: string;
23488
+ };
23489
+ };
23490
+
23491
+ export type CancelPayoutBatchResponse = ({
23492
+ batch: PayoutBatch;
23493
+ });
23494
+
23495
+ export type CancelPayoutBatchError = (ErrorResponse);
23496
+
23497
+ export type GetPostTimelineData = {
23498
+ query: {
23499
+ /**
23500
+ * Start of date range (ISO 8601). Defaults to 90 days ago.
23501
+ */
23502
+ fromDate?: string;
23503
+ /**
23504
+ * The post to fetch timeline for. Accepts an ExternalPost ID, a platformPostId, or a Zernio Post ID.
23505
+ *
23506
+ */
23507
+ postId: string;
23508
+ /**
23509
+ * End of date range (ISO 8601). Defaults to now.
23510
+ */
23511
+ toDate?: string;
23512
+ };
23513
+ };
23514
+
23515
+ export type GetPostTimelineResponse = ({
23516
+ /**
23517
+ * The postId that was requested
23518
+ */
23519
+ postId?: string;
23520
+ timeline?: Array<{
23521
+ /**
23522
+ * Date in YYYY-MM-DD format
23523
+ */
23524
+ date?: string;
23525
+ /**
23526
+ * Platform name (e.g. instagram, tiktok)
23527
+ */
23528
+ platform?: string;
23529
+ /**
23530
+ * Platform-specific post ID
23531
+ */
23532
+ platformPostId?: string;
23533
+ /**
23534
+ * Total impressions on this date
23535
+ */
23536
+ impressions?: number;
23537
+ /**
23538
+ * Total reach on this date
23539
+ */
23540
+ reach?: number;
23541
+ /**
23542
+ * Total likes on this date
23543
+ */
23544
+ likes?: number;
23545
+ /**
23546
+ * Total comments on this date
23547
+ */
23548
+ comments?: number;
23549
+ /**
23550
+ * Total shares on this date
23551
+ */
23552
+ shares?: number;
23553
+ /**
23554
+ * Total saves on this date
23555
+ */
23556
+ saves?: number;
23557
+ /**
23558
+ * Total clicks on this date
23559
+ */
23560
+ clicks?: number;
23561
+ /**
23562
+ * Total views on this date
23563
+ */
23564
+ views?: number;
23565
+ /**
23566
+ * Follows attributed to the post on this date (Instagram feed and stories, Facebook Reels, TikTok business lane). Null on Instagram Reels and video and on Facebook posts that are not Reels, where Meta has no follows metric; 0 on other platforms.
23567
+ */
23568
+ follows?: (number) | null;
23569
+ /**
23570
+ * TikTok business lane: share of viewers who watched to the end on this date, 0 to 1; 0 elsewhere
23571
+ */
23572
+ completionRate?: number;
23573
+ /**
23574
+ * Instagram feed posts (images and carousels; 0 on Reels and Stories) and TikTok business lane: profile views attributed to the post on this date; 0 elsewhere
23575
+ */
23576
+ profileViews?: number;
23577
+ /**
23578
+ * TikTok business lane: website-link clicks attributed to the post on this date (also inside clicks); 0 elsewhere
23579
+ */
23580
+ websiteClicks?: number;
23581
+ /**
23582
+ * TikTok business lane: share of views by surface on this date (forYou, follow, search, personalProfile, sound, directMessage, other), fractions 0 to 1; empty object elsewhere
23583
+ */
23584
+ impressionSources?: {
23585
+ [key: string]: (number);
23586
+ };
23587
+ /**
23588
+ * TikTok business lane: follower / nonFollower and newViewer / returnViewer shares on this date, fractions 0 to 1; empty object elsewhere
23589
+ */
23590
+ audienceTypes?: {
23591
+ [key: string]: (number);
23592
+ };
23593
+ /**
23594
+ * TikTok business lane: viewer-country shares on this date keyed by ISO-3166 alpha-2, fractions 0 to 1, top 20 with the tail in `other`; empty object elsewhere
23595
+ */
23596
+ audienceCountries?: {
23597
+ [key: string]: (number);
23598
+ };
23599
+ /**
23600
+ * Facebook Reels only: plays that were replays, as of this date; 0 elsewhere
23601
+ */
23602
+ replays?: number;
23603
+ /**
23604
+ * Facebook Reels and TikTok business lane: share still watching at each second of playback, fractions 0 to 1. Facebook Reels (Meta post_video_retention_graph): the base is a subset of plays that Meta selects and does not expose: on small Reels it can be far below views (6 of 51 measured), so a value is a share of that subset, not of all plays. Keys are whole seconds from the start of a play ("3" is the share still watching at 3 s). Loops count as continued playback, so a short Reels curve runs past its length (an 8 s Reel has keys "0" to "12"); Meta returns at most 41 points, so a long Reel covers only its first 40 s. TikTok accounts connected through the TikTok for Business app also fill it from TikTok video_view_retention: share still watching at each whole second, fractions 0 to 1, at most 61 points, thinned evenly on videos longer than 60 s. Values are as of this date; empty object for other media and platforms.
23605
+ */
23606
+ retentionCurve?: {
23607
+ [key: string]: (number);
23608
+ };
23609
+ }>;
23610
+ });
23611
+
23612
+ export type GetPostTimelineError = ({
23613
+ error?: string;
23614
+ } | ErrorResponse | {
23615
+ error?: string;
23616
+ code?: string;
23617
+ });
23618
+
23619
+ export type RunGoogleAnalyticsReportData = {
23620
+ body: (GoogleAnalyticsReportFields & {
23621
+ /**
23622
+ * Defaults to the last 28 days (`28daysAgo` to `yesterday`).
23623
+ */
23624
+ dateRanges?: Array<{
23625
+ /**
23626
+ * YYYY-MM-DD, today, yesterday or NdaysAgo.
23627
+ */
23628
+ startDate: string;
23629
+ /**
23630
+ * YYYY-MM-DD, today, yesterday or NdaysAgo.
23631
+ */
23632
+ endDate: string;
23633
+ name?: string;
23634
+ }>;
23635
+ /**
23636
+ * Row offset for paging through a report larger than `limit`.
23637
+ */
23638
+ offset?: number;
23639
+ keepEmptyRows?: boolean;
23640
+ /**
23641
+ * ISO 4217 code for currency metrics. Defaults to the property currency.
23642
+ */
23643
+ currencyCode?: string;
23644
+ });
23645
+ };
23646
+
23647
+ export type RunGoogleAnalyticsReportResponse = (GoogleAnalyticsReport);
23648
+
23649
+ export type RunGoogleAnalyticsReportError = (ErrorResponse | unknown | {
23650
+ error?: string;
23651
+ });
23652
+
23653
+ export type RunGoogleAnalyticsRealtimeReportData = {
23654
+ body: (GoogleAnalyticsReportFields & {
23655
+ minuteRanges?: Array<{
23656
+ startMinutesAgo?: number;
23657
+ endMinutesAgo?: number;
23658
+ name?: string;
23659
+ }>;
23660
+ });
23661
+ };
23662
+
23663
+ export type RunGoogleAnalyticsRealtimeReportResponse = (GoogleAnalyticsReport);
23664
+
23665
+ export type RunGoogleAnalyticsRealtimeReportError = (ErrorResponse | unknown | {
23666
+ error?: string;
23667
+ });
23668
+
23669
+ export type GetGoogleAnalyticsMetadataData = {
23670
+ query: {
23671
+ /**
23672
+ * Zernio account ID of the Google Analytics connection.
23673
+ */
23674
+ accountId: string;
23675
+ };
23676
+ };
23677
+
23678
+ export type GetGoogleAnalyticsMetadataResponse = ({
23679
+ accountId?: string;
23680
+ propertyId?: string;
23681
+ dimensions?: Array<{
23682
+ apiName?: string;
23683
+ uiName?: string;
23684
+ description?: string;
23685
+ category?: string;
21368
23686
  customDefinition?: boolean;
21369
23687
  }>;
21370
23688
  metrics?: Array<{
@@ -21381,6 +23699,186 @@ export type GetGoogleAnalyticsMetadataError = (ErrorResponse | unknown | {
21381
23699
  error?: string;
21382
23700
  });
21383
23701
 
23702
+ export type OpenTrackingWindowData = {
23703
+ body: {
23704
+ /**
23705
+ * Id of an external post. Required unless `accountId` and `url` are both sent.
23706
+ */
23707
+ postId?: string;
23708
+ /**
23709
+ * Connected account the post belongs to. Send together with `url`.
23710
+ */
23711
+ accountId?: string;
23712
+ /**
23713
+ * Public URL of the post on the platform. Send together with `accountId`.
23714
+ */
23715
+ url?: string;
23716
+ /**
23717
+ * How many days the window stays open.
23718
+ */
23719
+ trackingDays?: number;
23720
+ /**
23721
+ * Free-form label for who asked for the window. It is stored and returned as given.
23722
+ */
23723
+ requestedBy?: string;
23724
+ };
23725
+ };
23726
+
23727
+ export type OpenTrackingWindowResponse = (TrackingWindowResponse);
23728
+
23729
+ export type OpenTrackingWindowError = (ErrorResponse | {
23730
+ error?: string;
23731
+ code?: string;
23732
+ });
23733
+
23734
+ export type ListTrackingWindowsData = {
23735
+ query?: {
23736
+ /**
23737
+ * Only windows for this connected account.
23738
+ */
23739
+ accountId?: string;
23740
+ /**
23741
+ * Page size.
23742
+ */
23743
+ limit?: number;
23744
+ /**
23745
+ * Number of windows to skip.
23746
+ */
23747
+ skip?: number;
23748
+ /**
23749
+ * Only windows in this status.
23750
+ */
23751
+ status?: 'open' | 'completing' | 'completed' | 'cancelled';
23752
+ };
23753
+ };
23754
+
23755
+ export type ListTrackingWindowsResponse = ({
23756
+ windows: Array<TrackingWindow>;
23757
+ });
23758
+
23759
+ export type ListTrackingWindowsError = (ErrorResponse | {
23760
+ error?: string;
23761
+ code?: string;
23762
+ });
23763
+
23764
+ export type GetTrackingWindowData = {
23765
+ path: {
23766
+ windowId: string;
23767
+ };
23768
+ };
23769
+
23770
+ export type GetTrackingWindowResponse = (TrackingWindowResponse);
23771
+
23772
+ export type GetTrackingWindowError = (ErrorResponse | {
23773
+ error?: string;
23774
+ code?: string;
23775
+ });
23776
+
23777
+ export type CancelTrackingWindowData = {
23778
+ path: {
23779
+ windowId: string;
23780
+ };
23781
+ };
23782
+
23783
+ export type CancelTrackingWindowResponse = (TrackingWindowResponse);
23784
+
23785
+ export type CancelTrackingWindowError = (ErrorResponse | {
23786
+ error?: string;
23787
+ code?: string;
23788
+ });
23789
+
23790
+ export type GetPostSamplesData = {
23791
+ query: {
23792
+ /**
23793
+ * Earliest sample to return (ISO 8601).
23794
+ */
23795
+ fromDate?: string;
23796
+ /**
23797
+ * Maximum number of samples.
23798
+ */
23799
+ limit?: number;
23800
+ /**
23801
+ * The post to read samples for. Accepts an external post id, a platform post id or a Zernio post id.
23802
+ */
23803
+ postId: string;
23804
+ /**
23805
+ * Latest sample to return (ISO 8601).
23806
+ */
23807
+ toDate?: string;
23808
+ };
23809
+ };
23810
+
23811
+ export type GetPostSamplesResponse = ({
23812
+ /**
23813
+ * The postId that was requested
23814
+ */
23815
+ postId: string;
23816
+ samples: Array<PostSample>;
23817
+ });
23818
+
23819
+ export type GetPostSamplesError = (ErrorResponse | {
23820
+ error?: string;
23821
+ code?: string;
23822
+ });
23823
+
23824
+ export type GetPostAuthenticityData = {
23825
+ path: {
23826
+ /**
23827
+ * An external post id, a platform post id or a Zernio post id.
23828
+ */
23829
+ postId: string;
23830
+ };
23831
+ };
23832
+
23833
+ export type GetPostAuthenticityResponse = (PostAuthenticity);
23834
+
23835
+ export type GetPostAuthenticityError = (ErrorResponse | {
23836
+ error?: string;
23837
+ code?: string;
23838
+ });
23839
+
23840
+ export type ListPostAuthenticityData = {
23841
+ query: {
23842
+ /**
23843
+ * The connected account to list scores for.
23844
+ */
23845
+ accountId: string;
23846
+ /**
23847
+ * Only scores computed at or after this time (ISO 8601).
23848
+ */
23849
+ from?: string;
23850
+ /**
23851
+ * Page size.
23852
+ */
23853
+ limit?: number;
23854
+ /**
23855
+ * Only scores at or below this value.
23856
+ */
23857
+ maxScore?: number;
23858
+ /**
23859
+ * Only scores at or above this value.
23860
+ */
23861
+ minScore?: number;
23862
+ /**
23863
+ * Number of scores to skip.
23864
+ */
23865
+ skip?: number;
23866
+ /**
23867
+ * Only scores computed at or before this time (ISO 8601).
23868
+ */
23869
+ to?: string;
23870
+ };
23871
+ };
23872
+
23873
+ export type ListPostAuthenticityResponse = ({
23874
+ scores: Array<PostAuthenticity>;
23875
+ });
23876
+
23877
+ export type ListPostAuthenticityError = (ErrorResponse | {
23878
+ error?: string;
23879
+ code?: string;
23880
+ });
23881
+
21384
23882
  export type GetGoogleBusinessPerformanceData = {
21385
23883
  query: {
21386
23884
  /**
@@ -23051,6 +25549,15 @@ export type ListAccountsData = {
23051
25549
  *
23052
25550
  */
23053
25551
  excludeHidden?: boolean;
25552
+ /**
25553
+ * When true, also lists the accounts creators connected to your creator campaigns. They
25554
+ * sit on creator profiles, which `GET /v1/profiles` does not list, and are left out by
25555
+ * default. Asking for one creator profile by `profileId` lists its accounts either way.
25556
+ * Applied before pagination. Accepts `true` or `false` in any letter case; any other value
25557
+ * returns 400.
25558
+ *
25559
+ */
25560
+ includeCreatorAccounts?: boolean;
23054
25561
  /**
23055
25562
  * When true, includes accounts from over-limit profiles.
23056
25563
  */
@@ -23979,7 +26486,7 @@ export type ListApiKeysError = (ErrorResponse | {
23979
26486
  /**
23980
26487
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
23981
26488
  */
23982
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26489
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
23983
26490
  });
23984
26491
 
23985
26492
  export type CreateApiKeyData = {
@@ -24004,7 +26511,7 @@ export type CreateApiKeyData = {
24004
26511
  /**
24005
26512
  * Resource groups to DISABLE on this key (opt-out denylist). Omit for a legacy full-access key. A key with any group disabled mints with the zrk_ prefix, gets 403 with code=insufficient_permissions and required_group on operations in disabled groups (each operation's group is published as x-resource-group), and can never manage API keys, invites, or member identity. With 'messages' disabled, the key cannot read or send direct messages through any API surface and cannot create or edit a webhook subscription broader than itself. Subscriptions that already exist are governed by their own `disabledResourceGroups`, not by this key's. OAuth connector tokens resolve against the same registry, but their groups are not settable yet.
24006
26513
  */
24007
- disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files')>;
26514
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files')>;
24008
26515
  };
24009
26516
  };
24010
26517
 
@@ -24019,7 +26526,7 @@ export type CreateApiKeyError = (unknown | ErrorResponse | {
24019
26526
  /**
24020
26527
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24021
26528
  */
24022
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26529
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24023
26530
  });
24024
26531
 
24025
26532
  export type DeleteApiKeyData = {
@@ -24038,7 +26545,7 @@ export type DeleteApiKeyError = (ErrorResponse | {
24038
26545
  /**
24039
26546
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24040
26547
  */
24041
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26548
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24042
26549
  } | {
24043
26550
  error?: string;
24044
26551
  });
@@ -24053,7 +26560,7 @@ export type ListConnectedAppsError = (ErrorResponse | {
24053
26560
  /**
24054
26561
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24055
26562
  */
24056
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26563
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24057
26564
  });
24058
26565
 
24059
26566
  export type RevokeConnectedAppData = {
@@ -24084,7 +26591,7 @@ export type RevokeConnectedAppError = (ErrorResponse | {
24084
26591
  /**
24085
26592
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24086
26593
  */
24087
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26594
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24088
26595
  });
24089
26596
 
24090
26597
  export type CreateInviteTokenData = {
@@ -24128,7 +26635,7 @@ export type CreateInviteTokenError = (unknown | ErrorResponse | {
24128
26635
  /**
24129
26636
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24130
26637
  */
24131
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
26638
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24132
26639
  });
24133
26640
 
24134
26641
  export type GetConnectUrlData = {
@@ -31251,7 +33758,7 @@ export type GetWebhookSettingsError = (ErrorResponse | {
31251
33758
  /**
31252
33759
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31253
33760
  */
31254
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
33761
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31255
33762
  });
31256
33763
 
31257
33764
  export type CreateWebhookSettingsData = {
@@ -31271,7 +33778,7 @@ export type CreateWebhookSettingsData = {
31271
33778
  /**
31272
33779
  * Events to subscribe to (at least one required)
31273
33780
  */
31274
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
33781
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
31275
33782
  /**
31276
33783
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
31277
33784
  */
@@ -31285,7 +33792,7 @@ export type CreateWebhookSettingsData = {
31285
33792
  /**
31286
33793
  * Resource groups this subscription does not receive (opt-out denylist). Omit or send an empty array to receive every event in `events`. Listing a group here drops its events before delivery and on every replay path. Set at creation it applies to everything this subscription ever receives; changed later via PUT it applies to events emitted after the change, with a five-minute tail for events already queued (see that operation). When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned into whatever you send here, so a restricted key can never create a subscription wider than itself.
31287
33794
  */
31288
- disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files')>;
33795
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files')>;
31289
33796
  /**
31290
33797
  * Profiles this subscription receives events for. Omit or send an empty array to receive every profile. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing is created. Typical use is routing the profile that holds test accounts to a staging endpoint.
31291
33798
  */
@@ -31308,7 +33815,7 @@ export type CreateWebhookSettingsError = (unknown | ErrorResponse | {
31308
33815
  /**
31309
33816
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31310
33817
  */
31311
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
33818
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31312
33819
  });
31313
33820
 
31314
33821
  export type UpdateWebhookSettingsData = {
@@ -31337,7 +33844,7 @@ export type UpdateWebhookSettingsData = {
31337
33844
  /**
31338
33845
  * Events to subscribe to. Must contain at least one event if provided.
31339
33846
  */
31340
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
33847
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
31341
33848
  /**
31342
33849
  * Enable or disable webhook delivery
31343
33850
  */
@@ -31351,7 +33858,7 @@ export type UpdateWebhookSettingsData = {
31351
33858
  /**
31352
33859
  * Replaces the subscription's denylist. Send an empty array to clear it and receive every event in `events` again. Omitting the field leaves the current denylist untouched. Applies to events emitted after the update; already-queued events can still deliver for up to five minutes after they were enqueued. When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned back in either way, so a restricted key can neither clear nor widen a subscription past its own groups.
31353
33860
  */
31354
- disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files')>;
33861
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files')>;
31355
33862
  /**
31356
33863
  * Replaces the subscription's profile allowlist. Send an empty array to receive every profile again. Omitting the field leaves the current list untouched. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing changes. Applies to events emitted after the update. Sending the stored list back unchanged is accepted without re-validation, so an endpoint stays editable after a listed profile is deleted.
31357
33864
  */
@@ -31374,7 +33881,7 @@ export type UpdateWebhookSettingsError = (unknown | ErrorResponse | {
31374
33881
  /**
31375
33882
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31376
33883
  */
31377
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
33884
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31378
33885
  });
31379
33886
 
31380
33887
  export type DeleteWebhookSettingsData = {
@@ -31401,7 +33908,7 @@ export type DeleteWebhookSettingsError = (unknown | ErrorResponse | {
31401
33908
  /**
31402
33909
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31403
33910
  */
31404
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
33911
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31405
33912
  });
31406
33913
 
31407
33914
  export type GetWebhookLogsData = {
@@ -31465,7 +33972,7 @@ export type GetWebhookLogsError = (unknown | ErrorResponse | {
31465
33972
  /**
31466
33973
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31467
33974
  */
31468
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
33975
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31469
33976
  });
31470
33977
 
31471
33978
  export type RedeliverWebhookEventData = {
@@ -31492,7 +33999,7 @@ export type RedeliverWebhookEventError = (unknown | ErrorResponse | {
31492
33999
  /**
31493
34000
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31494
34001
  */
31495
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
34002
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31496
34003
  } | {
31497
34004
  success?: boolean;
31498
34005
  message?: string;
@@ -31507,7 +34014,7 @@ export type TestWebhookData = {
31507
34014
  /**
31508
34015
  * Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
31509
34016
  */
31510
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted' | 'analytics.synced' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
34017
+ event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
31511
34018
  };
31512
34019
  };
31513
34020
 
@@ -31522,7 +34029,7 @@ export type TestWebhookError = (unknown | ErrorResponse | {
31522
34029
  /**
31523
34030
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
31524
34031
  */
31525
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
34032
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
31526
34033
  } | {
31527
34034
  success?: boolean;
31528
34035
  message?: string;
@@ -43268,7 +45775,7 @@ export type GetWhatsAppFlowsEncryptionKeyError = (ErrorResponse | {
43268
45775
  /**
43269
45776
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
43270
45777
  */
43271
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
45778
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
43272
45779
  } | unknown);
43273
45780
 
43274
45781
  export type SetWhatsAppFlowsEncryptionKeyData = {
@@ -43294,7 +45801,7 @@ export type SetWhatsAppFlowsEncryptionKeyError = (ErrorResponse | {
43294
45801
  /**
43295
45802
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
43296
45803
  */
43297
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
45804
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
43298
45805
  } | unknown);
43299
45806
 
43300
45807
  export type SendWhatsAppFlowMessageData = {
@@ -63283,7 +65790,7 @@ export type PrepareMediaError = (ErrorResponse | {
63283
65790
  /**
63284
65791
  * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
63285
65792
  */
63286
- required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'calendar' | 'files';
65793
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
63287
65794
  } | unknown);
63288
65795
 
63289
65796
  export type ListChangelogData = {
@@ -63316,4 +65823,601 @@ export type ListChangelogResponse = ({
63316
65823
  nextCursor: (string) | null;
63317
65824
  });
63318
65825
 
63319
- export type ListChangelogError = (ErrorResponse);
65826
+ export type ListChangelogError = (ErrorResponse);
65827
+
65828
+ export type CreateCreatorCampaignData = {
65829
+ body: CreateCreatorCampaignRequest;
65830
+ headers?: {
65831
+ /**
65832
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
65833
+ */
65834
+ 'Idempotency-Key'?: string;
65835
+ };
65836
+ };
65837
+
65838
+ export type CreateCreatorCampaignResponse = ({
65839
+ campaign: CreatorCampaign;
65840
+ });
65841
+
65842
+ export type CreateCreatorCampaignError = (ErrorResponse | unknown);
65843
+
65844
+ export type ListCreatorCampaignsData = {
65845
+ query?: {
65846
+ limit?: number;
65847
+ /**
65848
+ * Only campaigns in this profile.
65849
+ */
65850
+ profileId?: string;
65851
+ /**
65852
+ * Only campaigns whose name or brand name contains this text, ignoring case.
65853
+ */
65854
+ q?: string;
65855
+ skip?: number;
65856
+ status?: 'draft' | 'active' | 'paused' | 'closed';
65857
+ };
65858
+ };
65859
+
65860
+ export type ListCreatorCampaignsResponse = ({
65861
+ campaigns: Array<CreatorCampaign>;
65862
+ total: number;
65863
+ });
65864
+
65865
+ export type ListCreatorCampaignsError = (ErrorResponse);
65866
+
65867
+ export type GetCreatorCampaignData = {
65868
+ path: {
65869
+ /**
65870
+ * Campaign ID.
65871
+ */
65872
+ campaignId: string;
65873
+ };
65874
+ };
65875
+
65876
+ export type GetCreatorCampaignResponse = ({
65877
+ campaign: CreatorCampaign;
65878
+ });
65879
+
65880
+ export type GetCreatorCampaignError = (ErrorResponse);
65881
+
65882
+ export type UpdateCreatorCampaignData = {
65883
+ body: UpdateCreatorCampaignRequest;
65884
+ path: {
65885
+ /**
65886
+ * Campaign ID.
65887
+ */
65888
+ campaignId: string;
65889
+ };
65890
+ };
65891
+
65892
+ export type UpdateCreatorCampaignResponse = ({
65893
+ campaign: CreatorCampaign;
65894
+ });
65895
+
65896
+ export type UpdateCreatorCampaignError = (ErrorResponse);
65897
+
65898
+ export type RaiseCreatorCampaignBudgetData = {
65899
+ body: {
65900
+ /**
65901
+ * The new total budget in cents.
65902
+ */
65903
+ budgetCents: number;
65904
+ };
65905
+ headers?: {
65906
+ /**
65907
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
65908
+ */
65909
+ 'Idempotency-Key'?: string;
65910
+ };
65911
+ path: {
65912
+ /**
65913
+ * Campaign ID.
65914
+ */
65915
+ campaignId: string;
65916
+ };
65917
+ };
65918
+
65919
+ export type RaiseCreatorCampaignBudgetResponse = ({
65920
+ campaign: CreatorCampaign;
65921
+ });
65922
+
65923
+ export type RaiseCreatorCampaignBudgetError = (ErrorResponse | unknown);
65924
+
65925
+ export type ActivateCreatorCampaignData = {
65926
+ path: {
65927
+ /**
65928
+ * Campaign ID.
65929
+ */
65930
+ campaignId: string;
65931
+ };
65932
+ };
65933
+
65934
+ export type ActivateCreatorCampaignResponse = ({
65935
+ campaign: CreatorCampaign;
65936
+ });
65937
+
65938
+ export type ActivateCreatorCampaignError = (ErrorResponse);
65939
+
65940
+ export type PauseCreatorCampaignData = {
65941
+ path: {
65942
+ /**
65943
+ * Campaign ID.
65944
+ */
65945
+ campaignId: string;
65946
+ };
65947
+ };
65948
+
65949
+ export type PauseCreatorCampaignResponse = ({
65950
+ campaign: CreatorCampaign;
65951
+ });
65952
+
65953
+ export type PauseCreatorCampaignError = (ErrorResponse);
65954
+
65955
+ export type CloseCreatorCampaignData = {
65956
+ path: {
65957
+ /**
65958
+ * Campaign ID.
65959
+ */
65960
+ campaignId: string;
65961
+ };
65962
+ };
65963
+
65964
+ export type CloseCreatorCampaignResponse = ({
65965
+ campaign: CreatorCampaign;
65966
+ });
65967
+
65968
+ export type CloseCreatorCampaignError = (ErrorResponse);
65969
+
65970
+ export type CreateCampaignParticipantData = {
65971
+ body: {
65972
+ displayName: string;
65973
+ email?: string;
65974
+ };
65975
+ headers?: {
65976
+ /**
65977
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
65978
+ */
65979
+ 'Idempotency-Key'?: string;
65980
+ };
65981
+ path: {
65982
+ /**
65983
+ * Campaign ID.
65984
+ */
65985
+ campaignId: string;
65986
+ };
65987
+ };
65988
+
65989
+ export type CreateCampaignParticipantResponse = ({
65990
+ participant: CampaignParticipant;
65991
+ /**
65992
+ * The creator's personal join link. Treat it as a secret.
65993
+ */
65994
+ inviteUrl: string;
65995
+ });
65996
+
65997
+ export type CreateCampaignParticipantError = (ErrorResponse | unknown);
65998
+
65999
+ export type ListCampaignParticipantsData = {
66000
+ path: {
66001
+ /**
66002
+ * Campaign ID.
66003
+ */
66004
+ campaignId: string;
66005
+ };
66006
+ query?: {
66007
+ limit?: number;
66008
+ skip?: number;
66009
+ status?: 'invited' | 'active' | 'suspended' | 'removed';
66010
+ };
66011
+ };
66012
+
66013
+ export type ListCampaignParticipantsResponse = ({
66014
+ participants: Array<CampaignParticipant>;
66015
+ total: number;
66016
+ });
66017
+
66018
+ export type ListCampaignParticipantsError = (ErrorResponse);
66019
+
66020
+ export type GetCampaignParticipantData = {
66021
+ path: {
66022
+ /**
66023
+ * Campaign ID.
66024
+ */
66025
+ campaignId: string;
66026
+ /**
66027
+ * Participant ID.
66028
+ */
66029
+ participantId: string;
66030
+ };
66031
+ };
66032
+
66033
+ export type GetCampaignParticipantResponse = ({
66034
+ participant: CampaignParticipant;
66035
+ });
66036
+
66037
+ export type GetCampaignParticipantError = (ErrorResponse);
66038
+
66039
+ export type SuspendCampaignParticipantData = {
66040
+ path: {
66041
+ /**
66042
+ * Campaign ID.
66043
+ */
66044
+ campaignId: string;
66045
+ /**
66046
+ * Participant ID.
66047
+ */
66048
+ participantId: string;
66049
+ };
66050
+ };
66051
+
66052
+ export type SuspendCampaignParticipantResponse = ({
66053
+ participant: CampaignParticipant;
66054
+ });
66055
+
66056
+ export type SuspendCampaignParticipantError = (ErrorResponse);
66057
+
66058
+ export type ReinstateCampaignParticipantData = {
66059
+ path: {
66060
+ /**
66061
+ * Campaign ID.
66062
+ */
66063
+ campaignId: string;
66064
+ /**
66065
+ * Participant ID.
66066
+ */
66067
+ participantId: string;
66068
+ };
66069
+ };
66070
+
66071
+ export type ReinstateCampaignParticipantResponse = ({
66072
+ participant: CampaignParticipant;
66073
+ });
66074
+
66075
+ export type ReinstateCampaignParticipantError = (ErrorResponse);
66076
+
66077
+ export type RemoveCampaignParticipantData = {
66078
+ path: {
66079
+ /**
66080
+ * Campaign ID.
66081
+ */
66082
+ campaignId: string;
66083
+ /**
66084
+ * Participant ID.
66085
+ */
66086
+ participantId: string;
66087
+ };
66088
+ };
66089
+
66090
+ export type RemoveCampaignParticipantResponse = ({
66091
+ participant: CampaignParticipant;
66092
+ });
66093
+
66094
+ export type RemoveCampaignParticipantError = (ErrorResponse);
66095
+
66096
+ export type SettleCampaignParticipantData = {
66097
+ body: {
66098
+ /**
66099
+ * Defaults to the whole payable balance.
66100
+ */
66101
+ amountCents?: number;
66102
+ /**
66103
+ * Your payout id. Required when the campaign settles externally.
66104
+ */
66105
+ externalReference?: string;
66106
+ /**
66107
+ * Treasury campaigns only: record a payout you already made outside Zernio, without moving money. Ignored on other settlement modes, which always record.
66108
+ */
66109
+ recordOnly?: boolean;
66110
+ };
66111
+ headers?: {
66112
+ /**
66113
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66114
+ */
66115
+ 'Idempotency-Key'?: string;
66116
+ };
66117
+ path: {
66118
+ /**
66119
+ * Campaign ID.
66120
+ */
66121
+ campaignId: string;
66122
+ /**
66123
+ * Participant ID.
66124
+ */
66125
+ participantId: string;
66126
+ };
66127
+ };
66128
+
66129
+ export type SettleCampaignParticipantResponse = ({
66130
+ settlement: CampaignSettlement;
66131
+ });
66132
+
66133
+ export type SettleCampaignParticipantError = (ErrorResponse | unknown);
66134
+
66135
+ export type CreateCampaignPayoutBatchData = {
66136
+ body?: {
66137
+ /**
66138
+ * Pay only these participants. Defaults to every payable participant who is ready.
66139
+ */
66140
+ participantIds?: Array<(string)>;
66141
+ /**
66142
+ * Leave these participants out.
66143
+ */
66144
+ excludeParticipantIds?: Array<(string)>;
66145
+ };
66146
+ headers?: {
66147
+ /**
66148
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66149
+ */
66150
+ 'Idempotency-Key'?: string;
66151
+ };
66152
+ path: {
66153
+ /**
66154
+ * Campaign ID.
66155
+ */
66156
+ campaignId: string;
66157
+ };
66158
+ };
66159
+
66160
+ export type CreateCampaignPayoutBatchResponse = ({
66161
+ batch: PayoutBatch;
66162
+ /**
66163
+ * Stripe Checkout for the card payment.
66164
+ */
66165
+ url: string;
66166
+ });
66167
+
66168
+ export type CreateCampaignPayoutBatchError = (ErrorResponse);
66169
+
66170
+ export type ListCampaignPayoutBatchesData = {
66171
+ path: {
66172
+ /**
66173
+ * Campaign ID.
66174
+ */
66175
+ campaignId: string;
66176
+ };
66177
+ query?: {
66178
+ limit?: number;
66179
+ skip?: number;
66180
+ };
66181
+ };
66182
+
66183
+ export type ListCampaignPayoutBatchesResponse = ({
66184
+ batches: Array<PayoutBatch>;
66185
+ total: number;
66186
+ });
66187
+
66188
+ export type ListCampaignPayoutBatchesError = (ErrorResponse);
66189
+
66190
+ export type CreateCampaignInviteLinkData = {
66191
+ path: {
66192
+ /**
66193
+ * Campaign ID.
66194
+ */
66195
+ campaignId: string;
66196
+ };
66197
+ };
66198
+
66199
+ export type CreateCampaignInviteLinkResponse = ({
66200
+ inviteUrl: string;
66201
+ });
66202
+
66203
+ export type CreateCampaignInviteLinkError = (ErrorResponse);
66204
+
66205
+ export type ListCampaignSubmissionsData = {
66206
+ path: {
66207
+ /**
66208
+ * Campaign ID.
66209
+ */
66210
+ campaignId: string;
66211
+ };
66212
+ query?: {
66213
+ flag?: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity';
66214
+ limit?: number;
66215
+ maxScore?: number;
66216
+ minScore?: number;
66217
+ order?: 'asc' | 'desc';
66218
+ participantId?: string;
66219
+ platform?: 'tiktok' | 'instagram' | 'youtube';
66220
+ /**
66221
+ * Only submissions whose creator name or post link contains this text, ignoring case.
66222
+ */
66223
+ q?: string;
66224
+ skip?: number;
66225
+ /**
66226
+ * What to sort by. Posts with no value to sort by (not read yet, not scored) come last in either direction.
66227
+ */
66228
+ sort?: 'submittedAt' | 'viewsEligible' | 'earnedCents' | 'authenticityScore';
66229
+ status?: 'received' | 'tracking' | 'pending_review' | 'approved' | 'rejected' | 'expired' | 'withdrawn';
66230
+ };
66231
+ };
66232
+
66233
+ export type ListCampaignSubmissionsResponse = ({
66234
+ submissions: Array<CampaignSubmission>;
66235
+ total: number;
66236
+ });
66237
+
66238
+ export type ListCampaignSubmissionsError = (ErrorResponse);
66239
+
66240
+ export type GetCampaignSubmissionData = {
66241
+ path: {
66242
+ /**
66243
+ * Campaign ID.
66244
+ */
66245
+ campaignId: string;
66246
+ /**
66247
+ * Submission ID.
66248
+ */
66249
+ submissionId: string;
66250
+ };
66251
+ };
66252
+
66253
+ export type GetCampaignSubmissionResponse = ({
66254
+ submission: CampaignSubmissionDetail;
66255
+ });
66256
+
66257
+ export type GetCampaignSubmissionError = (ErrorResponse);
66258
+
66259
+ export type ApproveCampaignSubmissionData = {
66260
+ headers?: {
66261
+ /**
66262
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66263
+ */
66264
+ 'Idempotency-Key'?: string;
66265
+ };
66266
+ path: {
66267
+ /**
66268
+ * Campaign ID.
66269
+ */
66270
+ campaignId: string;
66271
+ /**
66272
+ * Submission ID.
66273
+ */
66274
+ submissionId: string;
66275
+ };
66276
+ };
66277
+
66278
+ export type ApproveCampaignSubmissionResponse = ({
66279
+ submission: CampaignSubmission;
66280
+ });
66281
+
66282
+ export type ApproveCampaignSubmissionError = (ErrorResponse | unknown);
66283
+
66284
+ export type RejectCampaignSubmissionData = {
66285
+ body: {
66286
+ reason: string;
66287
+ };
66288
+ headers?: {
66289
+ /**
66290
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66291
+ */
66292
+ 'Idempotency-Key'?: string;
66293
+ };
66294
+ path: {
66295
+ /**
66296
+ * Campaign ID.
66297
+ */
66298
+ campaignId: string;
66299
+ /**
66300
+ * Submission ID.
66301
+ */
66302
+ submissionId: string;
66303
+ };
66304
+ };
66305
+
66306
+ export type RejectCampaignSubmissionResponse = ({
66307
+ submission: CampaignSubmission;
66308
+ });
66309
+
66310
+ export type RejectCampaignSubmissionError = (ErrorResponse | unknown);
66311
+
66312
+ export type ReopenCampaignSubmissionData = {
66313
+ headers?: {
66314
+ /**
66315
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66316
+ */
66317
+ 'Idempotency-Key'?: string;
66318
+ };
66319
+ path: {
66320
+ /**
66321
+ * Campaign ID.
66322
+ */
66323
+ campaignId: string;
66324
+ /**
66325
+ * Submission ID.
66326
+ */
66327
+ submissionId: string;
66328
+ };
66329
+ };
66330
+
66331
+ export type ReopenCampaignSubmissionResponse = ({
66332
+ submission: CampaignSubmission;
66333
+ });
66334
+
66335
+ export type ReopenCampaignSubmissionError = (ErrorResponse | unknown);
66336
+
66337
+ export type ListCampaignPayablesData = {
66338
+ path: {
66339
+ /**
66340
+ * Campaign ID.
66341
+ */
66342
+ campaignId: string;
66343
+ };
66344
+ };
66345
+
66346
+ export type ListCampaignPayablesResponse = ({
66347
+ payables: Array<CampaignPayable>;
66348
+ });
66349
+
66350
+ export type ListCampaignPayablesError = (ErrorResponse);
66351
+
66352
+ export type CreateCampaignAdjustmentData = {
66353
+ body: {
66354
+ participantId: string;
66355
+ /**
66356
+ * Non-zero. Positive credits, negative claws back.
66357
+ */
66358
+ amountCents: number;
66359
+ cause: string;
66360
+ };
66361
+ headers?: {
66362
+ /**
66363
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. A request cut off mid-handler (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
66364
+ */
66365
+ 'Idempotency-Key'?: string;
66366
+ };
66367
+ path: {
66368
+ /**
66369
+ * Campaign ID.
66370
+ */
66371
+ campaignId: string;
66372
+ };
66373
+ };
66374
+
66375
+ export type CreateCampaignAdjustmentResponse = ({
66376
+ entry: CampaignAdjustment;
66377
+ });
66378
+
66379
+ export type CreateCampaignAdjustmentError = (ErrorResponse | unknown);
66380
+
66381
+ export type ListCampaignLedgerData = {
66382
+ path: {
66383
+ /**
66384
+ * Campaign ID.
66385
+ */
66386
+ campaignId: string;
66387
+ };
66388
+ query?: {
66389
+ kind?: 'accrual' | 'approval' | 'hold_release' | 'adjustment' | 'settling' | 'settlement' | 'reversal' | 'topup' | 'transfer' | 'fee';
66390
+ limit?: number;
66391
+ /**
66392
+ * List only this participant's entries.
66393
+ */
66394
+ participantId?: string;
66395
+ skip?: number;
66396
+ };
66397
+ };
66398
+
66399
+ export type ListCampaignLedgerResponse = ({
66400
+ entries: Array<CampaignLedgerEntry>;
66401
+ pagination: {
66402
+ total: number;
66403
+ limit: number;
66404
+ skip: number;
66405
+ };
66406
+ });
66407
+
66408
+ export type ListCampaignLedgerError = (ErrorResponse);
66409
+
66410
+ export type GetCampaignReportData = {
66411
+ path: {
66412
+ /**
66413
+ * Campaign ID.
66414
+ */
66415
+ campaignId: string;
66416
+ };
66417
+ };
66418
+
66419
+ export type GetCampaignReportResponse = ({
66420
+ report: CampaignReport;
66421
+ });
66422
+
66423
+ export type GetCampaignReportError = (ErrorResponse);