getricky 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/index.d.ts +1 -1
- package/dist/cjs/generated/sdk.gen.d.ts +33 -1
- package/dist/cjs/generated/sdk.gen.js +60 -0
- package/dist/cjs/generated/types.gen.d.ts +598 -25
- package/dist/esm/generated/index.d.ts +1 -1
- package/dist/esm/generated/sdk.gen.d.ts +33 -1
- package/dist/esm/generated/sdk.gen.js +60 -0
- package/dist/esm/generated/types.gen.d.ts +598 -25
- package/package.json +1 -1
|
@@ -25,6 +25,341 @@ export type Error = {
|
|
|
25
25
|
request_id: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* A campaign of a connected ad account.
|
|
30
|
+
*/
|
|
31
|
+
export type MetaAdsCampaign = {
|
|
32
|
+
/**
|
|
33
|
+
* Campaign ID at Meta.
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Ad account ID at Meta.
|
|
38
|
+
*/
|
|
39
|
+
account_id: string;
|
|
40
|
+
/**
|
|
41
|
+
* Name in Meta.
|
|
42
|
+
*/
|
|
43
|
+
name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Objective, such as `OUTCOME_ENGAGEMENT`.
|
|
46
|
+
*/
|
|
47
|
+
objective: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Status the advertiser set: `ACTIVE`, `PAUSED`, …
|
|
50
|
+
*/
|
|
51
|
+
status: string;
|
|
52
|
+
/**
|
|
53
|
+
* Delivery status, including a parent paused: `ACTIVE`, `CAMPAIGN_PAUSED`, …
|
|
54
|
+
*/
|
|
55
|
+
effective_status: string;
|
|
56
|
+
/**
|
|
57
|
+
* `AUCTION` or `RESERVED`.
|
|
58
|
+
*/
|
|
59
|
+
buying_type: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Bid strategy, when the campaign sets one.
|
|
62
|
+
*/
|
|
63
|
+
bid_strategy: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Budget as Meta reports it, in the ad account currency.
|
|
66
|
+
*/
|
|
67
|
+
budget: {
|
|
68
|
+
/**
|
|
69
|
+
* Daily budget in the account currency; null when not set.
|
|
70
|
+
*/
|
|
71
|
+
daily: number | null;
|
|
72
|
+
/**
|
|
73
|
+
* Lifetime budget in the account currency; null when not set.
|
|
74
|
+
*/
|
|
75
|
+
lifetime: number | null;
|
|
76
|
+
/**
|
|
77
|
+
* Budget left in the account currency.
|
|
78
|
+
*/
|
|
79
|
+
remaining: number | null;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
83
|
+
*/
|
|
84
|
+
start_time: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
87
|
+
*/
|
|
88
|
+
stop_time: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
91
|
+
*/
|
|
92
|
+
created_time: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
95
|
+
*/
|
|
96
|
+
updated_time: string | null;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* An ad set of a connected ad account.
|
|
100
|
+
*/
|
|
101
|
+
export type MetaAdsAdSet = {
|
|
102
|
+
/**
|
|
103
|
+
* Ad set ID at Meta.
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Ad account ID at Meta.
|
|
108
|
+
*/
|
|
109
|
+
account_id: string;
|
|
110
|
+
/**
|
|
111
|
+
* Campaign ID at Meta.
|
|
112
|
+
*/
|
|
113
|
+
campaign_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* Name in Meta.
|
|
116
|
+
*/
|
|
117
|
+
name: string;
|
|
118
|
+
/**
|
|
119
|
+
* Status the advertiser set: `ACTIVE`, `PAUSED`, …
|
|
120
|
+
*/
|
|
121
|
+
status: string;
|
|
122
|
+
/**
|
|
123
|
+
* Delivery status, including a parent paused: `ACTIVE`, `CAMPAIGN_PAUSED`, …
|
|
124
|
+
*/
|
|
125
|
+
effective_status: string;
|
|
126
|
+
/**
|
|
127
|
+
* What Meta optimizes delivery for.
|
|
128
|
+
*/
|
|
129
|
+
optimization_goal: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* What Meta charges for.
|
|
132
|
+
*/
|
|
133
|
+
billing_event: string | null;
|
|
134
|
+
/**
|
|
135
|
+
* Bid strategy, when the campaign sets one.
|
|
136
|
+
*/
|
|
137
|
+
bid_strategy: string | null;
|
|
138
|
+
/**
|
|
139
|
+
* Budget as Meta reports it, in the ad account currency.
|
|
140
|
+
*/
|
|
141
|
+
budget: {
|
|
142
|
+
/**
|
|
143
|
+
* Daily budget in the account currency; null when not set.
|
|
144
|
+
*/
|
|
145
|
+
daily: number | null;
|
|
146
|
+
/**
|
|
147
|
+
* Lifetime budget in the account currency; null when not set.
|
|
148
|
+
*/
|
|
149
|
+
lifetime: number | null;
|
|
150
|
+
/**
|
|
151
|
+
* Budget left in the account currency.
|
|
152
|
+
*/
|
|
153
|
+
remaining: number | null;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
157
|
+
*/
|
|
158
|
+
start_time: string | null;
|
|
159
|
+
/**
|
|
160
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
161
|
+
*/
|
|
162
|
+
end_time: string | null;
|
|
163
|
+
/**
|
|
164
|
+
* Meta's targeting spec as Meta returns it: ages, locations, interests, …
|
|
165
|
+
*/
|
|
166
|
+
targeting: unknown;
|
|
167
|
+
/**
|
|
168
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
169
|
+
*/
|
|
170
|
+
created_time: string | null;
|
|
171
|
+
/**
|
|
172
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
173
|
+
*/
|
|
174
|
+
updated_time: string | null;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* An ad of a connected ad account, with its creative copy.
|
|
178
|
+
*/
|
|
179
|
+
export type MetaAdsAd = {
|
|
180
|
+
/**
|
|
181
|
+
* Ad ID at Meta.
|
|
182
|
+
*/
|
|
183
|
+
id: string;
|
|
184
|
+
/**
|
|
185
|
+
* Ad account ID at Meta.
|
|
186
|
+
*/
|
|
187
|
+
account_id: string;
|
|
188
|
+
/**
|
|
189
|
+
* Campaign ID at Meta.
|
|
190
|
+
*/
|
|
191
|
+
campaign_id: string;
|
|
192
|
+
/**
|
|
193
|
+
* Ad set ID at Meta.
|
|
194
|
+
*/
|
|
195
|
+
ad_set_id: string;
|
|
196
|
+
/**
|
|
197
|
+
* Name in Meta.
|
|
198
|
+
*/
|
|
199
|
+
name: string;
|
|
200
|
+
/**
|
|
201
|
+
* Status the advertiser set: `ACTIVE`, `PAUSED`, …
|
|
202
|
+
*/
|
|
203
|
+
status: string;
|
|
204
|
+
/**
|
|
205
|
+
* Delivery status, including a parent paused: `ACTIVE`, `CAMPAIGN_PAUSED`, …
|
|
206
|
+
*/
|
|
207
|
+
effective_status: string;
|
|
208
|
+
/**
|
|
209
|
+
* The creative the ad runs; null when Meta returns none.
|
|
210
|
+
*/
|
|
211
|
+
creative: {
|
|
212
|
+
/**
|
|
213
|
+
* Creative ID at Meta.
|
|
214
|
+
*/
|
|
215
|
+
id: string;
|
|
216
|
+
/**
|
|
217
|
+
* Headline.
|
|
218
|
+
*/
|
|
219
|
+
title: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Primary text.
|
|
222
|
+
*/
|
|
223
|
+
body: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* Button, such as `LEARN_MORE`.
|
|
226
|
+
*/
|
|
227
|
+
call_to_action_type: string | null;
|
|
228
|
+
/**
|
|
229
|
+
* Image URL Meta returns.
|
|
230
|
+
*/
|
|
231
|
+
image_url: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* Thumbnail URL Meta returns; it expires.
|
|
234
|
+
*/
|
|
235
|
+
thumbnail_url: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* The Instagram post it runs.
|
|
238
|
+
*/
|
|
239
|
+
instagram_permalink_url: string | null;
|
|
240
|
+
/**
|
|
241
|
+
* Meta's story spec as Meta returns it: page, link, message and media.
|
|
242
|
+
*/
|
|
243
|
+
object_story_spec: unknown;
|
|
244
|
+
} | null;
|
|
245
|
+
/**
|
|
246
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
247
|
+
*/
|
|
248
|
+
created_time: string | null;
|
|
249
|
+
/**
|
|
250
|
+
* ISO 8601 time as Meta reports it; null if unset.
|
|
251
|
+
*/
|
|
252
|
+
updated_time: string | null;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Performance Meta computed for one row of the requested level, period and breakdowns.
|
|
256
|
+
*/
|
|
257
|
+
export type MetaAdsInsight = {
|
|
258
|
+
/**
|
|
259
|
+
* Ad account ID at Meta.
|
|
260
|
+
*/
|
|
261
|
+
account_id: string;
|
|
262
|
+
/**
|
|
263
|
+
* Campaign ID, at campaign level or below.
|
|
264
|
+
*/
|
|
265
|
+
campaign_id: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Campaign name, at campaign level or below.
|
|
268
|
+
*/
|
|
269
|
+
campaign_name: string | null;
|
|
270
|
+
/**
|
|
271
|
+
* Ad set ID, at ad set level or below.
|
|
272
|
+
*/
|
|
273
|
+
ad_set_id: string | null;
|
|
274
|
+
/**
|
|
275
|
+
* Ad set name, at ad set level or below.
|
|
276
|
+
*/
|
|
277
|
+
ad_set_name: string | null;
|
|
278
|
+
/**
|
|
279
|
+
* Ad ID, at ad level.
|
|
280
|
+
*/
|
|
281
|
+
ad_id: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* Ad name, at ad level.
|
|
284
|
+
*/
|
|
285
|
+
ad_name: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* First day of the row, in the ad account's time zone.
|
|
288
|
+
*/
|
|
289
|
+
date_start: string;
|
|
290
|
+
/**
|
|
291
|
+
* Last day of the row, in the ad account's time zone.
|
|
292
|
+
*/
|
|
293
|
+
date_stop: string;
|
|
294
|
+
/**
|
|
295
|
+
* The value of each requested breakdown for this row, such as `{"age": "25-34"}`.
|
|
296
|
+
*/
|
|
297
|
+
breakdown: {
|
|
298
|
+
[key: string]: string;
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* ISO 4217 currency of the ad account.
|
|
302
|
+
*/
|
|
303
|
+
currency_code: string;
|
|
304
|
+
/**
|
|
305
|
+
* Spend in the account currency.
|
|
306
|
+
*/
|
|
307
|
+
spend: number | null;
|
|
308
|
+
/**
|
|
309
|
+
* Impressions.
|
|
310
|
+
*/
|
|
311
|
+
impressions: number | null;
|
|
312
|
+
/**
|
|
313
|
+
* People reached.
|
|
314
|
+
*/
|
|
315
|
+
reach: number | null;
|
|
316
|
+
/**
|
|
317
|
+
* Impressions per person reached.
|
|
318
|
+
*/
|
|
319
|
+
frequency: number | null;
|
|
320
|
+
/**
|
|
321
|
+
* Clicks.
|
|
322
|
+
*/
|
|
323
|
+
clicks: number | null;
|
|
324
|
+
/**
|
|
325
|
+
* Click-through rate, in percent.
|
|
326
|
+
*/
|
|
327
|
+
ctr: number | null;
|
|
328
|
+
/**
|
|
329
|
+
* Cost per click.
|
|
330
|
+
*/
|
|
331
|
+
cpc: number | null;
|
|
332
|
+
/**
|
|
333
|
+
* Cost per 1,000 impressions.
|
|
334
|
+
*/
|
|
335
|
+
cpm: number | null;
|
|
336
|
+
/**
|
|
337
|
+
* Actions Meta counted, per action type.
|
|
338
|
+
*/
|
|
339
|
+
actions: Array<{
|
|
340
|
+
/**
|
|
341
|
+
* Meta's action type, such as `link_click` or `onsite_conversion.messaging_conversation_started_7d`.
|
|
342
|
+
*/
|
|
343
|
+
action_type: string;
|
|
344
|
+
/**
|
|
345
|
+
* Count, or cost in the account currency.
|
|
346
|
+
*/
|
|
347
|
+
value: number;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* Cost of each action type.
|
|
351
|
+
*/
|
|
352
|
+
cost_per_action: Array<{
|
|
353
|
+
/**
|
|
354
|
+
* Meta's action type, such as `link_click` or `onsite_conversion.messaging_conversation_started_7d`.
|
|
355
|
+
*/
|
|
356
|
+
action_type: string;
|
|
357
|
+
/**
|
|
358
|
+
* Count, or cost in the account currency.
|
|
359
|
+
*/
|
|
360
|
+
value: number;
|
|
361
|
+
}>;
|
|
362
|
+
};
|
|
28
363
|
/**
|
|
29
364
|
* An AI agent that answers conversations alongside the team.
|
|
30
365
|
*/
|
|
@@ -223,10 +558,6 @@ export type Contact = {
|
|
|
223
558
|
* Sales lead status.
|
|
224
559
|
*/
|
|
225
560
|
lead_status: 'new' | 'open' | 'in_progress' | 'attempted' | 'connected' | 'unqualified' | 'bad_timing' | null;
|
|
226
|
-
/**
|
|
227
|
-
* Lifecycle stage.
|
|
228
|
-
*/
|
|
229
|
-
lifecycle_stage: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other' | null;
|
|
230
561
|
/**
|
|
231
562
|
* Custom field values keyed by contact field ID. See `GET /contact-fields`.
|
|
232
563
|
*/
|
|
@@ -610,10 +941,6 @@ export type Broadcast = {
|
|
|
610
941
|
audience: {
|
|
611
942
|
type: 'filter';
|
|
612
943
|
tag_id: string | null;
|
|
613
|
-
/**
|
|
614
|
-
* Only contacts at this stage; null for any.
|
|
615
|
-
*/
|
|
616
|
-
lifecycle_stage: string | null;
|
|
617
944
|
/**
|
|
618
945
|
* Only contacts whose name, phone, email or company contains it.
|
|
619
946
|
*/
|
|
@@ -2795,7 +3122,7 @@ export type TemplateFieldMappings = {
|
|
|
2795
3122
|
/**
|
|
2796
3123
|
* A field every contact has.
|
|
2797
3124
|
*/
|
|
2798
|
-
field: 'first_name' | 'last_name' | 'primary_phone' | 'primary_email' | 'company' | 'job_title' | 'birthday' | 'street_address' | 'city' | 'region' | 'postal_code' | 'country' | 'website_url' | 'linkedin_url' | '
|
|
3125
|
+
field: 'first_name' | 'last_name' | 'primary_phone' | 'primary_email' | 'company' | 'job_title' | 'birthday' | 'street_address' | 'city' | 'region' | 'postal_code' | 'country' | 'website_url' | 'linkedin_url' | 'lead_status' | 'source' | 'notes';
|
|
2799
3126
|
} | {
|
|
2800
3127
|
kind: 'custom';
|
|
2801
3128
|
/**
|
|
@@ -3126,7 +3453,6 @@ export type CreateContact = {
|
|
|
3126
3453
|
*/
|
|
3127
3454
|
owner_user_id?: string | null;
|
|
3128
3455
|
lead_status?: 'new' | 'open' | 'in_progress' | 'attempted' | 'connected' | 'unqualified' | 'bad_timing' | null;
|
|
3129
|
-
lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other' | null;
|
|
3130
3456
|
/**
|
|
3131
3457
|
* Values keyed by contact field ID. Keys you omit keep their value.
|
|
3132
3458
|
*/
|
|
@@ -3211,7 +3537,6 @@ export type UpdateContact = {
|
|
|
3211
3537
|
*/
|
|
3212
3538
|
owner_user_id?: string | null;
|
|
3213
3539
|
lead_status?: 'new' | 'open' | 'in_progress' | 'attempted' | 'connected' | 'unqualified' | 'bad_timing' | null;
|
|
3214
|
-
lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other' | null;
|
|
3215
3540
|
/**
|
|
3216
3541
|
* Values keyed by contact field ID. Keys you omit keep their value.
|
|
3217
3542
|
*/
|
|
@@ -3419,10 +3744,6 @@ export type CreateBroadcast = {
|
|
|
3419
3744
|
* Only contacts with this tag.
|
|
3420
3745
|
*/
|
|
3421
3746
|
tag_id?: string;
|
|
3422
|
-
/**
|
|
3423
|
-
* Only contacts at this stage.
|
|
3424
|
-
*/
|
|
3425
|
-
lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
|
|
3426
3747
|
/**
|
|
3427
3748
|
* Only contacts whose name, phone, email or company contains it.
|
|
3428
3749
|
*/
|
|
@@ -3460,7 +3781,7 @@ export type CreateBroadcast = {
|
|
|
3460
3781
|
/**
|
|
3461
3782
|
* A field of the contact.
|
|
3462
3783
|
*/
|
|
3463
|
-
field: 'birthday' | 'city' | 'company' | 'country' | 'first_name' | 'job_title' | 'last_name' | 'lead_status' | '
|
|
3784
|
+
field: 'birthday' | 'city' | 'company' | 'country' | 'first_name' | 'job_title' | 'last_name' | 'lead_status' | 'linkedin_url' | 'notes' | 'postal_code' | 'primary_email' | 'primary_phone' | 'region' | 'source' | 'street_address' | 'website_url';
|
|
3464
3785
|
} | {
|
|
3465
3786
|
type: 'custom_field';
|
|
3466
3787
|
/**
|
|
@@ -3487,10 +3808,6 @@ export type PreviewBroadcastAudience = {
|
|
|
3487
3808
|
* Only contacts with this tag.
|
|
3488
3809
|
*/
|
|
3489
3810
|
tag_id?: string;
|
|
3490
|
-
/**
|
|
3491
|
-
* Only contacts at this stage.
|
|
3492
|
-
*/
|
|
3493
|
-
lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
|
|
3494
3811
|
/**
|
|
3495
3812
|
* Only contacts whose name, phone, email or company contains it.
|
|
3496
3813
|
*/
|
|
@@ -4384,7 +4701,7 @@ export type ReplaceTemplateFieldMappings = {
|
|
|
4384
4701
|
/**
|
|
4385
4702
|
* A field every contact has.
|
|
4386
4703
|
*/
|
|
4387
|
-
field: 'first_name' | 'last_name' | 'primary_phone' | 'primary_email' | 'company' | 'job_title' | 'birthday' | 'street_address' | 'city' | 'region' | 'postal_code' | 'country' | 'website_url' | 'linkedin_url' | '
|
|
4704
|
+
field: 'first_name' | 'last_name' | 'primary_phone' | 'primary_email' | 'company' | 'job_title' | 'birthday' | 'street_address' | 'city' | 'region' | 'postal_code' | 'country' | 'website_url' | 'linkedin_url' | 'lead_status' | 'source' | 'notes';
|
|
4388
4705
|
} | {
|
|
4389
4706
|
kind: 'custom';
|
|
4390
4707
|
/**
|
|
@@ -4784,10 +5101,6 @@ export type ListContactsData = {
|
|
|
4784
5101
|
* Only contacts this member owns.
|
|
4785
5102
|
*/
|
|
4786
5103
|
owner_user_id?: string;
|
|
4787
|
-
/**
|
|
4788
|
-
* Only contacts at this stage.
|
|
4789
|
-
*/
|
|
4790
|
-
lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
|
|
4791
5104
|
/**
|
|
4792
5105
|
* Only contacts reachable on this channel.
|
|
4793
5106
|
*/
|
|
@@ -7404,6 +7717,266 @@ export type GetAdsReportResponses = {
|
|
|
7404
7717
|
};
|
|
7405
7718
|
};
|
|
7406
7719
|
export type GetAdsReportResponse = GetAdsReportResponses[keyof GetAdsReportResponses];
|
|
7720
|
+
export type ListMetaAdsCampaignsData = {
|
|
7721
|
+
body?: never;
|
|
7722
|
+
path?: never;
|
|
7723
|
+
query?: {
|
|
7724
|
+
/**
|
|
7725
|
+
* Only this connected ad account.
|
|
7726
|
+
*/
|
|
7727
|
+
account_id?: string;
|
|
7728
|
+
/**
|
|
7729
|
+
* `true` returns only what Meta is delivering now (effective status `ACTIVE`).
|
|
7730
|
+
*/
|
|
7731
|
+
active_only?: 'true' | 'false';
|
|
7732
|
+
};
|
|
7733
|
+
url: '/ads/campaigns';
|
|
7734
|
+
};
|
|
7735
|
+
export type ListMetaAdsCampaignsErrors = {
|
|
7736
|
+
/**
|
|
7737
|
+
* `invalid_input`: A parameter or body field is invalid; `param` names it when known.
|
|
7738
|
+
*/
|
|
7739
|
+
400: Error;
|
|
7740
|
+
/**
|
|
7741
|
+
* `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
|
|
7742
|
+
*/
|
|
7743
|
+
401: Error;
|
|
7744
|
+
/**
|
|
7745
|
+
* `forbidden`: The organization does not allow the operation.
|
|
7746
|
+
*
|
|
7747
|
+
* `insufficient_scope`: The key lacks the scope this operation requires.
|
|
7748
|
+
*/
|
|
7749
|
+
403: Error;
|
|
7750
|
+
/**
|
|
7751
|
+
* `rule_violation`: The request breaks a business rule; `message` says which.
|
|
7752
|
+
*/
|
|
7753
|
+
422: Error;
|
|
7754
|
+
/**
|
|
7755
|
+
* `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
|
|
7756
|
+
*/
|
|
7757
|
+
429: Error;
|
|
7758
|
+
/**
|
|
7759
|
+
* `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
|
|
7760
|
+
*/
|
|
7761
|
+
500: Error;
|
|
7762
|
+
};
|
|
7763
|
+
export type ListMetaAdsCampaignsError = ListMetaAdsCampaignsErrors[keyof ListMetaAdsCampaignsErrors];
|
|
7764
|
+
export type ListMetaAdsCampaignsResponses = {
|
|
7765
|
+
/**
|
|
7766
|
+
* Success.
|
|
7767
|
+
*/
|
|
7768
|
+
200: {
|
|
7769
|
+
data: Array<MetaAdsCampaign>;
|
|
7770
|
+
/**
|
|
7771
|
+
* Pass as `cursor` for the next page; null on the last page.
|
|
7772
|
+
*/
|
|
7773
|
+
next_cursor: string | null;
|
|
7774
|
+
};
|
|
7775
|
+
};
|
|
7776
|
+
export type ListMetaAdsCampaignsResponse = ListMetaAdsCampaignsResponses[keyof ListMetaAdsCampaignsResponses];
|
|
7777
|
+
export type ListMetaAdsAdSetsData = {
|
|
7778
|
+
body?: never;
|
|
7779
|
+
path?: never;
|
|
7780
|
+
query?: {
|
|
7781
|
+
/**
|
|
7782
|
+
* Only this connected ad account.
|
|
7783
|
+
*/
|
|
7784
|
+
account_id?: string;
|
|
7785
|
+
/**
|
|
7786
|
+
* Only the ad sets of this campaign.
|
|
7787
|
+
*/
|
|
7788
|
+
campaign_id?: string;
|
|
7789
|
+
/**
|
|
7790
|
+
* `true` returns only what Meta is delivering now (effective status `ACTIVE`).
|
|
7791
|
+
*/
|
|
7792
|
+
active_only?: 'true' | 'false';
|
|
7793
|
+
};
|
|
7794
|
+
url: '/ads/ad-sets';
|
|
7795
|
+
};
|
|
7796
|
+
export type ListMetaAdsAdSetsErrors = {
|
|
7797
|
+
/**
|
|
7798
|
+
* `invalid_input`: A parameter or body field is invalid; `param` names it when known.
|
|
7799
|
+
*/
|
|
7800
|
+
400: Error;
|
|
7801
|
+
/**
|
|
7802
|
+
* `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
|
|
7803
|
+
*/
|
|
7804
|
+
401: Error;
|
|
7805
|
+
/**
|
|
7806
|
+
* `forbidden`: The organization does not allow the operation.
|
|
7807
|
+
*
|
|
7808
|
+
* `insufficient_scope`: The key lacks the scope this operation requires.
|
|
7809
|
+
*/
|
|
7810
|
+
403: Error;
|
|
7811
|
+
/**
|
|
7812
|
+
* `rule_violation`: The request breaks a business rule; `message` says which.
|
|
7813
|
+
*/
|
|
7814
|
+
422: Error;
|
|
7815
|
+
/**
|
|
7816
|
+
* `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
|
|
7817
|
+
*/
|
|
7818
|
+
429: Error;
|
|
7819
|
+
/**
|
|
7820
|
+
* `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
|
|
7821
|
+
*/
|
|
7822
|
+
500: Error;
|
|
7823
|
+
};
|
|
7824
|
+
export type ListMetaAdsAdSetsError = ListMetaAdsAdSetsErrors[keyof ListMetaAdsAdSetsErrors];
|
|
7825
|
+
export type ListMetaAdsAdSetsResponses = {
|
|
7826
|
+
/**
|
|
7827
|
+
* Success.
|
|
7828
|
+
*/
|
|
7829
|
+
200: {
|
|
7830
|
+
data: Array<MetaAdsAdSet>;
|
|
7831
|
+
/**
|
|
7832
|
+
* Pass as `cursor` for the next page; null on the last page.
|
|
7833
|
+
*/
|
|
7834
|
+
next_cursor: string | null;
|
|
7835
|
+
};
|
|
7836
|
+
};
|
|
7837
|
+
export type ListMetaAdsAdSetsResponse = ListMetaAdsAdSetsResponses[keyof ListMetaAdsAdSetsResponses];
|
|
7838
|
+
export type ListMetaAdsData = {
|
|
7839
|
+
body?: never;
|
|
7840
|
+
path?: never;
|
|
7841
|
+
query?: {
|
|
7842
|
+
/**
|
|
7843
|
+
* Only this connected ad account.
|
|
7844
|
+
*/
|
|
7845
|
+
account_id?: string;
|
|
7846
|
+
/**
|
|
7847
|
+
* Only the ads of this campaign.
|
|
7848
|
+
*/
|
|
7849
|
+
campaign_id?: string;
|
|
7850
|
+
/**
|
|
7851
|
+
* Only the ads of this ad set.
|
|
7852
|
+
*/
|
|
7853
|
+
ad_set_id?: string;
|
|
7854
|
+
/**
|
|
7855
|
+
* `true` returns only what Meta is delivering now (effective status `ACTIVE`).
|
|
7856
|
+
*/
|
|
7857
|
+
active_only?: 'true' | 'false';
|
|
7858
|
+
};
|
|
7859
|
+
url: '/ads/ads';
|
|
7860
|
+
};
|
|
7861
|
+
export type ListMetaAdsErrors = {
|
|
7862
|
+
/**
|
|
7863
|
+
* `invalid_input`: A parameter or body field is invalid; `param` names it when known.
|
|
7864
|
+
*/
|
|
7865
|
+
400: Error;
|
|
7866
|
+
/**
|
|
7867
|
+
* `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
|
|
7868
|
+
*/
|
|
7869
|
+
401: Error;
|
|
7870
|
+
/**
|
|
7871
|
+
* `forbidden`: The organization does not allow the operation.
|
|
7872
|
+
*
|
|
7873
|
+
* `insufficient_scope`: The key lacks the scope this operation requires.
|
|
7874
|
+
*/
|
|
7875
|
+
403: Error;
|
|
7876
|
+
/**
|
|
7877
|
+
* `rule_violation`: The request breaks a business rule; `message` says which.
|
|
7878
|
+
*/
|
|
7879
|
+
422: Error;
|
|
7880
|
+
/**
|
|
7881
|
+
* `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
|
|
7882
|
+
*/
|
|
7883
|
+
429: Error;
|
|
7884
|
+
/**
|
|
7885
|
+
* `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
|
|
7886
|
+
*/
|
|
7887
|
+
500: Error;
|
|
7888
|
+
};
|
|
7889
|
+
export type ListMetaAdsError = ListMetaAdsErrors[keyof ListMetaAdsErrors];
|
|
7890
|
+
export type ListMetaAdsResponses = {
|
|
7891
|
+
/**
|
|
7892
|
+
* Success.
|
|
7893
|
+
*/
|
|
7894
|
+
200: {
|
|
7895
|
+
data: Array<MetaAdsAd>;
|
|
7896
|
+
/**
|
|
7897
|
+
* Pass as `cursor` for the next page; null on the last page.
|
|
7898
|
+
*/
|
|
7899
|
+
next_cursor: string | null;
|
|
7900
|
+
};
|
|
7901
|
+
};
|
|
7902
|
+
export type ListMetaAdsResponse = ListMetaAdsResponses[keyof ListMetaAdsResponses];
|
|
7903
|
+
export type GetMetaAdsInsightsData = {
|
|
7904
|
+
body?: never;
|
|
7905
|
+
path?: never;
|
|
7906
|
+
query: {
|
|
7907
|
+
/**
|
|
7908
|
+
* Only this connected ad account.
|
|
7909
|
+
*/
|
|
7910
|
+
account_id?: string;
|
|
7911
|
+
/**
|
|
7912
|
+
* One row per ad account, campaign, ad set or ad.
|
|
7913
|
+
*/
|
|
7914
|
+
level?: 'account' | 'campaign' | 'ad_set' | 'ad';
|
|
7915
|
+
/**
|
|
7916
|
+
* First day, `YYYY-MM-DD`, in the ad account's time zone.
|
|
7917
|
+
*/
|
|
7918
|
+
from: string;
|
|
7919
|
+
/**
|
|
7920
|
+
* Last day, `YYYY-MM-DD`, inclusive. At most 400 days after `from`.
|
|
7921
|
+
*/
|
|
7922
|
+
to: string;
|
|
7923
|
+
/**
|
|
7924
|
+
* Split rows by up to two of `age`, `gender`, `country`, `region`, `publisher_platform`, `platform_position`, `device_platform`, comma-separated.
|
|
7925
|
+
*/
|
|
7926
|
+
breakdowns?: string;
|
|
7927
|
+
/**
|
|
7928
|
+
* `true` returns one row per day instead of one for the period.
|
|
7929
|
+
*/
|
|
7930
|
+
daily?: 'true' | 'false';
|
|
7931
|
+
/**
|
|
7932
|
+
* Only this campaign, ad set or ad.
|
|
7933
|
+
*/
|
|
7934
|
+
object_id?: string;
|
|
7935
|
+
};
|
|
7936
|
+
url: '/ads/insights';
|
|
7937
|
+
};
|
|
7938
|
+
export type GetMetaAdsInsightsErrors = {
|
|
7939
|
+
/**
|
|
7940
|
+
* `invalid_input`: A parameter or body field is invalid; `param` names it when known.
|
|
7941
|
+
*/
|
|
7942
|
+
400: Error;
|
|
7943
|
+
/**
|
|
7944
|
+
* `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
|
|
7945
|
+
*/
|
|
7946
|
+
401: Error;
|
|
7947
|
+
/**
|
|
7948
|
+
* `forbidden`: The organization does not allow the operation.
|
|
7949
|
+
*
|
|
7950
|
+
* `insufficient_scope`: The key lacks the scope this operation requires.
|
|
7951
|
+
*/
|
|
7952
|
+
403: Error;
|
|
7953
|
+
/**
|
|
7954
|
+
* `rule_violation`: The request breaks a business rule; `message` says which.
|
|
7955
|
+
*/
|
|
7956
|
+
422: Error;
|
|
7957
|
+
/**
|
|
7958
|
+
* `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
|
|
7959
|
+
*/
|
|
7960
|
+
429: Error;
|
|
7961
|
+
/**
|
|
7962
|
+
* `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
|
|
7963
|
+
*/
|
|
7964
|
+
500: Error;
|
|
7965
|
+
};
|
|
7966
|
+
export type GetMetaAdsInsightsError = GetMetaAdsInsightsErrors[keyof GetMetaAdsInsightsErrors];
|
|
7967
|
+
export type GetMetaAdsInsightsResponses = {
|
|
7968
|
+
/**
|
|
7969
|
+
* Success.
|
|
7970
|
+
*/
|
|
7971
|
+
200: {
|
|
7972
|
+
data: Array<MetaAdsInsight>;
|
|
7973
|
+
/**
|
|
7974
|
+
* Pass as `cursor` for the next page; null on the last page.
|
|
7975
|
+
*/
|
|
7976
|
+
next_cursor: string | null;
|
|
7977
|
+
};
|
|
7978
|
+
};
|
|
7979
|
+
export type GetMetaAdsInsightsResponse = GetMetaAdsInsightsResponses[keyof GetMetaAdsInsightsResponses];
|
|
7407
7980
|
export type ListAgentsData = {
|
|
7408
7981
|
body?: never;
|
|
7409
7982
|
path?: never;
|