@cesteral/msads-mcp 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cesteral-manifest.json +22 -0
  2. package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.js +1 -1
  3. package/dist/mcp-server/prompts/definitions/troubleshoot-entity.prompt.js.map +1 -1
  4. package/dist/mcp-server/tools/definitions/download-report.tool.d.ts +16 -16
  5. package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts +92 -74
  6. package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts.map +1 -1
  7. package/dist/mcp-server/tools/definitions/get-entity.tool.js +48 -25
  8. package/dist/mcp-server/tools/definitions/get-entity.tool.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/manage-criterions.tool.d.ts +4 -4
  10. package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts +1929 -17
  11. package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/update-entity.tool.js +173 -11
  13. package/dist/mcp-server/tools/definitions/update-entity.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/utils/capture-snapshot.d.ts +11 -0
  15. package/dist/mcp-server/tools/utils/capture-snapshot.d.ts.map +1 -0
  16. package/dist/mcp-server/tools/utils/capture-snapshot.js +113 -0
  17. package/dist/mcp-server/tools/utils/capture-snapshot.js.map +1 -0
  18. package/dist/mcp-server/tools/utils/dry-run.d.ts +13 -0
  19. package/dist/mcp-server/tools/utils/dry-run.d.ts.map +1 -0
  20. package/dist/mcp-server/tools/utils/dry-run.js +98 -0
  21. package/dist/mcp-server/tools/utils/dry-run.js.map +1 -0
  22. package/dist/testkit/fixtures/index.d.ts +11 -0
  23. package/dist/testkit/fixtures/index.d.ts.map +1 -0
  24. package/dist/testkit/fixtures/index.js +254 -0
  25. package/dist/testkit/fixtures/index.js.map +1 -0
  26. package/dist/testkit/index.d.ts +6 -0
  27. package/dist/testkit/index.d.ts.map +1 -0
  28. package/dist/testkit/index.js +26 -0
  29. package/dist/testkit/index.js.map +1 -0
  30. package/dist/testkit/types.d.ts +18 -0
  31. package/dist/testkit/types.d.ts.map +1 -0
  32. package/dist/testkit/types.js +2 -0
  33. package/dist/testkit/types.js.map +1 -0
  34. package/package.json +12 -2
  35. package/dist/mcp-server/tools/definitions/get-ad-preview.tool.d.ts +0 -68
  36. package/dist/mcp-server/tools/definitions/get-ad-preview.tool.d.ts.map +0 -1
  37. package/dist/mcp-server/tools/definitions/get-ad-preview.tool.js +0 -90
  38. package/dist/mcp-server/tools/definitions/get-ad-preview.tool.js.map +0 -1
  39. package/dist/types-global/mcp.d.ts +0 -2
  40. package/dist/types-global/mcp.d.ts.map +0 -1
  41. package/dist/types-global/mcp.js +0 -2
  42. package/dist/types-global/mcp.js.map +0 -1
  43. package/dist/utils/errors/index.d.ts +0 -2
  44. package/dist/utils/errors/index.d.ts.map +0 -1
  45. package/dist/utils/errors/index.js +0 -2
  46. package/dist/utils/errors/index.js.map +0 -1
  47. package/dist/utils/security/rate-limiter.d.ts +0 -3
  48. package/dist/utils/security/rate-limiter.d.ts.map +0 -1
  49. package/dist/utils/security/rate-limiter.js +0 -5
  50. package/dist/utils/security/rate-limiter.js.map +0 -1
  51. package/dist/utils/telemetry/index.d.ts +0 -2
  52. package/dist/utils/telemetry/index.d.ts.map +0 -1
  53. package/dist/utils/telemetry/index.js +0 -2
  54. package/dist/utils/telemetry/index.js.map +0 -1
  55. package/dist/utils/telemetry/tracing.d.ts +0 -3
  56. package/dist/utils/telemetry/tracing.d.ts.map +0 -1
  57. package/dist/utils/telemetry/tracing.js +0 -4
  58. package/dist/utils/telemetry/tracing.js.map +0 -1
@@ -1,27 +1,967 @@
1
1
  import { z } from "zod";
2
- import type { RequestContext, McpTextContent, SdkContext } from "@cesteral/shared";
3
- export declare const UpdateEntityInputSchema: z.ZodObject<{
4
- entityType: z.ZodEnum<[string, ...string[]]>;
2
+ import type { RequestContext, McpTextContent } from "@cesteral/shared";
3
+ import type { SdkContext } from "@cesteral/shared";
4
+ export declare const UpdateEntityInputSchema: z.ZodDiscriminatedUnion<"entityType", [z.ZodObject<{
5
+ entityType: z.ZodLiteral<"campaign">;
6
+ entityId: z.ZodString;
7
+ accountId: z.ZodString;
5
8
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6
10
  }, "strip", z.ZodTypeAny, {
7
- entityType: string;
11
+ entityType: "campaign";
12
+ accountId: string;
13
+ entityId: string;
8
14
  data: Record<string, unknown>;
15
+ dry_run: boolean;
9
16
  }, {
10
- entityType: string;
17
+ entityType: "campaign";
18
+ accountId: string;
19
+ entityId: string;
11
20
  data: Record<string, unknown>;
12
- }>;
21
+ dry_run?: boolean | undefined;
22
+ }>, z.ZodObject<{
23
+ entityType: z.ZodLiteral<"adGroup">;
24
+ entityId: z.ZodString;
25
+ campaignId: z.ZodString;
26
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
27
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ entityType: "adGroup";
30
+ entityId: string;
31
+ campaignId: string;
32
+ data: Record<string, unknown>;
33
+ dry_run: boolean;
34
+ }, {
35
+ entityType: "adGroup";
36
+ entityId: string;
37
+ campaignId: string;
38
+ data: Record<string, unknown>;
39
+ dry_run?: boolean | undefined;
40
+ }>, z.ZodObject<{
41
+ entityType: z.ZodLiteral<"ad">;
42
+ entityId: z.ZodString;
43
+ adGroupId: z.ZodString;
44
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
45
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ entityType: "ad";
48
+ entityId: string;
49
+ adGroupId: string;
50
+ data: Record<string, unknown>;
51
+ dry_run: boolean;
52
+ }, {
53
+ entityType: "ad";
54
+ entityId: string;
55
+ adGroupId: string;
56
+ data: Record<string, unknown>;
57
+ dry_run?: boolean | undefined;
58
+ }>, z.ZodObject<{
59
+ entityType: z.ZodLiteral<"keyword">;
60
+ entityId: z.ZodString;
61
+ adGroupId: z.ZodString;
62
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
63
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ entityType: "keyword";
66
+ entityId: string;
67
+ adGroupId: string;
68
+ data: Record<string, unknown>;
69
+ dry_run: boolean;
70
+ }, {
71
+ entityType: "keyword";
72
+ entityId: string;
73
+ adGroupId: string;
74
+ data: Record<string, unknown>;
75
+ dry_run?: boolean | undefined;
76
+ }>, z.ZodObject<{
77
+ entityType: z.ZodLiteral<"budget">;
78
+ entityId: z.ZodString;
79
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
80
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ entityType: "budget";
83
+ entityId: string;
84
+ data: Record<string, unknown>;
85
+ dry_run: boolean;
86
+ }, {
87
+ entityType: "budget";
88
+ entityId: string;
89
+ data: Record<string, unknown>;
90
+ dry_run?: boolean | undefined;
91
+ }>, z.ZodObject<{
92
+ entityType: z.ZodLiteral<"adExtension">;
93
+ entityId: z.ZodString;
94
+ accountId: z.ZodString;
95
+ adExtensionType: z.ZodString;
96
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
97
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ entityType: "adExtension";
100
+ accountId: string;
101
+ entityId: string;
102
+ adExtensionType: string;
103
+ data: Record<string, unknown>;
104
+ dry_run: boolean;
105
+ }, {
106
+ entityType: "adExtension";
107
+ accountId: string;
108
+ entityId: string;
109
+ adExtensionType: string;
110
+ data: Record<string, unknown>;
111
+ dry_run?: boolean | undefined;
112
+ }>, z.ZodObject<{
113
+ entityType: z.ZodLiteral<"audience">;
114
+ entityId: z.ZodString;
115
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
116
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ entityType: "audience";
119
+ entityId: string;
120
+ data: Record<string, unknown>;
121
+ dry_run: boolean;
122
+ }, {
123
+ entityType: "audience";
124
+ entityId: string;
125
+ data: Record<string, unknown>;
126
+ dry_run?: boolean | undefined;
127
+ }>, z.ZodObject<{
128
+ entityType: z.ZodLiteral<"label">;
129
+ entityId: z.ZodString;
130
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
131
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ entityType: "label";
134
+ entityId: string;
135
+ data: Record<string, unknown>;
136
+ dry_run: boolean;
137
+ }, {
138
+ entityType: "label";
139
+ entityId: string;
140
+ data: Record<string, unknown>;
141
+ dry_run?: boolean | undefined;
142
+ }>]>;
13
143
  export declare const UpdateEntityOutputSchema: z.ZodObject<{
14
144
  result: z.ZodRecord<z.ZodString, z.ZodAny>;
145
+ entityId: z.ZodString;
15
146
  entityType: z.ZodString;
147
+ updated: z.ZodBoolean;
16
148
  timestamp: z.ZodString;
149
+ dryRun: z.ZodOptional<z.ZodObject<{
150
+ wouldSucceed: z.ZodBoolean;
151
+ validationErrors: z.ZodArray<z.ZodObject<{
152
+ code: z.ZodString;
153
+ message: z.ZodString;
154
+ field: z.ZodOptional<z.ZodString>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ code: string;
157
+ message: string;
158
+ field?: string | undefined;
159
+ }, {
160
+ code: string;
161
+ message: string;
162
+ field?: string | undefined;
163
+ }>, "many">;
164
+ validationSource: z.ZodEnum<["native_validator", "symbolic", "none"]>;
165
+ expectedStateSource: z.ZodEnum<["native_simulator", "server_symbolic_apply", "none"]>;
166
+ expectedPostState: z.ZodOptional<z.ZodObject<{
167
+ schemaVersion: z.ZodLiteral<1>;
168
+ platform: z.ZodString;
169
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
170
+ platformEntityId: z.ZodString;
171
+ displayName: z.ZodNullable<z.ZodString>;
172
+ accountId: z.ZodNullable<z.ZodString>;
173
+ status: z.ZodObject<{
174
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
175
+ platformRaw: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
178
+ platformRaw: string;
179
+ }, {
180
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
181
+ platformRaw: string;
182
+ }>;
183
+ budget: z.ZodObject<{
184
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
185
+ amountMinor: z.ZodNumber;
186
+ currency: z.ZodString;
187
+ }, "strip", z.ZodTypeAny, {
188
+ amountMinor: number;
189
+ currency: string;
190
+ }, {
191
+ amountMinor: number;
192
+ currency: string;
193
+ }>>>;
194
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
195
+ amountMinor: z.ZodNumber;
196
+ currency: z.ZodString;
197
+ }, "strip", z.ZodTypeAny, {
198
+ amountMinor: number;
199
+ currency: string;
200
+ }, {
201
+ amountMinor: number;
202
+ currency: string;
203
+ }>>>;
204
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
205
+ amountMinor: z.ZodNumber;
206
+ currency: z.ZodString;
207
+ startAt: z.ZodNullable<z.ZodString>;
208
+ endAt: z.ZodNullable<z.ZodString>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ amountMinor: number;
211
+ currency: string;
212
+ startAt: string | null;
213
+ endAt: string | null;
214
+ }, {
215
+ amountMinor: number;
216
+ currency: string;
217
+ startAt: string | null;
218
+ endAt: string | null;
219
+ }>, "many">>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ daily?: {
222
+ amountMinor: number;
223
+ currency: string;
224
+ } | null | undefined;
225
+ lifetime?: {
226
+ amountMinor: number;
227
+ currency: string;
228
+ } | null | undefined;
229
+ segments?: {
230
+ amountMinor: number;
231
+ currency: string;
232
+ startAt: string | null;
233
+ endAt: string | null;
234
+ }[] | null | undefined;
235
+ }, {
236
+ daily?: {
237
+ amountMinor: number;
238
+ currency: string;
239
+ } | null | undefined;
240
+ lifetime?: {
241
+ amountMinor: number;
242
+ currency: string;
243
+ } | null | undefined;
244
+ segments?: {
245
+ amountMinor: number;
246
+ currency: string;
247
+ startAt: string | null;
248
+ endAt: string | null;
249
+ }[] | null | undefined;
250
+ }>;
251
+ schedule: z.ZodObject<{
252
+ startAt: z.ZodNullable<z.ZodString>;
253
+ endAt: z.ZodNullable<z.ZodString>;
254
+ }, "strip", z.ZodTypeAny, {
255
+ startAt: string | null;
256
+ endAt: string | null;
257
+ }, {
258
+ startAt: string | null;
259
+ endAt: string | null;
260
+ }>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ status: {
263
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
264
+ platformRaw: string;
265
+ };
266
+ platform: string;
267
+ schemaVersion: 1;
268
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
269
+ platformEntityId: string;
270
+ displayName: string | null;
271
+ accountId: string | null;
272
+ budget: {
273
+ daily?: {
274
+ amountMinor: number;
275
+ currency: string;
276
+ } | null | undefined;
277
+ lifetime?: {
278
+ amountMinor: number;
279
+ currency: string;
280
+ } | null | undefined;
281
+ segments?: {
282
+ amountMinor: number;
283
+ currency: string;
284
+ startAt: string | null;
285
+ endAt: string | null;
286
+ }[] | null | undefined;
287
+ };
288
+ schedule: {
289
+ startAt: string | null;
290
+ endAt: string | null;
291
+ };
292
+ }, {
293
+ status: {
294
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
295
+ platformRaw: string;
296
+ };
297
+ platform: string;
298
+ schemaVersion: 1;
299
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
300
+ platformEntityId: string;
301
+ displayName: string | null;
302
+ accountId: string | null;
303
+ budget: {
304
+ daily?: {
305
+ amountMinor: number;
306
+ currency: string;
307
+ } | null | undefined;
308
+ lifetime?: {
309
+ amountMinor: number;
310
+ currency: string;
311
+ } | null | undefined;
312
+ segments?: {
313
+ amountMinor: number;
314
+ currency: string;
315
+ startAt: string | null;
316
+ endAt: string | null;
317
+ }[] | null | undefined;
318
+ };
319
+ schedule: {
320
+ startAt: string | null;
321
+ endAt: string | null;
322
+ };
323
+ }>>;
324
+ }, "strip", z.ZodTypeAny, {
325
+ wouldSucceed: boolean;
326
+ validationErrors: {
327
+ code: string;
328
+ message: string;
329
+ field?: string | undefined;
330
+ }[];
331
+ validationSource: "native_validator" | "symbolic" | "none";
332
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
333
+ expectedPostState?: {
334
+ status: {
335
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
336
+ platformRaw: string;
337
+ };
338
+ platform: string;
339
+ schemaVersion: 1;
340
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
341
+ platformEntityId: string;
342
+ displayName: string | null;
343
+ accountId: string | null;
344
+ budget: {
345
+ daily?: {
346
+ amountMinor: number;
347
+ currency: string;
348
+ } | null | undefined;
349
+ lifetime?: {
350
+ amountMinor: number;
351
+ currency: string;
352
+ } | null | undefined;
353
+ segments?: {
354
+ amountMinor: number;
355
+ currency: string;
356
+ startAt: string | null;
357
+ endAt: string | null;
358
+ }[] | null | undefined;
359
+ };
360
+ schedule: {
361
+ startAt: string | null;
362
+ endAt: string | null;
363
+ };
364
+ } | undefined;
365
+ }, {
366
+ wouldSucceed: boolean;
367
+ validationErrors: {
368
+ code: string;
369
+ message: string;
370
+ field?: string | undefined;
371
+ }[];
372
+ validationSource: "native_validator" | "symbolic" | "none";
373
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
374
+ expectedPostState?: {
375
+ status: {
376
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
377
+ platformRaw: string;
378
+ };
379
+ platform: string;
380
+ schemaVersion: 1;
381
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
382
+ platformEntityId: string;
383
+ displayName: string | null;
384
+ accountId: string | null;
385
+ budget: {
386
+ daily?: {
387
+ amountMinor: number;
388
+ currency: string;
389
+ } | null | undefined;
390
+ lifetime?: {
391
+ amountMinor: number;
392
+ currency: string;
393
+ } | null | undefined;
394
+ segments?: {
395
+ amountMinor: number;
396
+ currency: string;
397
+ startAt: string | null;
398
+ endAt: string | null;
399
+ }[] | null | undefined;
400
+ };
401
+ schedule: {
402
+ startAt: string | null;
403
+ endAt: string | null;
404
+ };
405
+ } | undefined;
406
+ }>>;
407
+ before: z.ZodOptional<z.ZodObject<{
408
+ schemaVersion: z.ZodLiteral<1>;
409
+ platform: z.ZodString;
410
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
411
+ platformEntityId: z.ZodString;
412
+ displayName: z.ZodNullable<z.ZodString>;
413
+ accountId: z.ZodNullable<z.ZodString>;
414
+ status: z.ZodObject<{
415
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
416
+ platformRaw: z.ZodString;
417
+ }, "strip", z.ZodTypeAny, {
418
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
419
+ platformRaw: string;
420
+ }, {
421
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
422
+ platformRaw: string;
423
+ }>;
424
+ budget: z.ZodObject<{
425
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
426
+ amountMinor: z.ZodNumber;
427
+ currency: z.ZodString;
428
+ }, "strip", z.ZodTypeAny, {
429
+ amountMinor: number;
430
+ currency: string;
431
+ }, {
432
+ amountMinor: number;
433
+ currency: string;
434
+ }>>>;
435
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
436
+ amountMinor: z.ZodNumber;
437
+ currency: z.ZodString;
438
+ }, "strip", z.ZodTypeAny, {
439
+ amountMinor: number;
440
+ currency: string;
441
+ }, {
442
+ amountMinor: number;
443
+ currency: string;
444
+ }>>>;
445
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
446
+ amountMinor: z.ZodNumber;
447
+ currency: z.ZodString;
448
+ startAt: z.ZodNullable<z.ZodString>;
449
+ endAt: z.ZodNullable<z.ZodString>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ amountMinor: number;
452
+ currency: string;
453
+ startAt: string | null;
454
+ endAt: string | null;
455
+ }, {
456
+ amountMinor: number;
457
+ currency: string;
458
+ startAt: string | null;
459
+ endAt: string | null;
460
+ }>, "many">>>;
461
+ }, "strip", z.ZodTypeAny, {
462
+ daily?: {
463
+ amountMinor: number;
464
+ currency: string;
465
+ } | null | undefined;
466
+ lifetime?: {
467
+ amountMinor: number;
468
+ currency: string;
469
+ } | null | undefined;
470
+ segments?: {
471
+ amountMinor: number;
472
+ currency: string;
473
+ startAt: string | null;
474
+ endAt: string | null;
475
+ }[] | null | undefined;
476
+ }, {
477
+ daily?: {
478
+ amountMinor: number;
479
+ currency: string;
480
+ } | null | undefined;
481
+ lifetime?: {
482
+ amountMinor: number;
483
+ currency: string;
484
+ } | null | undefined;
485
+ segments?: {
486
+ amountMinor: number;
487
+ currency: string;
488
+ startAt: string | null;
489
+ endAt: string | null;
490
+ }[] | null | undefined;
491
+ }>;
492
+ schedule: z.ZodObject<{
493
+ startAt: z.ZodNullable<z.ZodString>;
494
+ endAt: z.ZodNullable<z.ZodString>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ startAt: string | null;
497
+ endAt: string | null;
498
+ }, {
499
+ startAt: string | null;
500
+ endAt: string | null;
501
+ }>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ status: {
504
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
505
+ platformRaw: string;
506
+ };
507
+ platform: string;
508
+ schemaVersion: 1;
509
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
510
+ platformEntityId: string;
511
+ displayName: string | null;
512
+ accountId: string | null;
513
+ budget: {
514
+ daily?: {
515
+ amountMinor: number;
516
+ currency: string;
517
+ } | null | undefined;
518
+ lifetime?: {
519
+ amountMinor: number;
520
+ currency: string;
521
+ } | null | undefined;
522
+ segments?: {
523
+ amountMinor: number;
524
+ currency: string;
525
+ startAt: string | null;
526
+ endAt: string | null;
527
+ }[] | null | undefined;
528
+ };
529
+ schedule: {
530
+ startAt: string | null;
531
+ endAt: string | null;
532
+ };
533
+ }, {
534
+ status: {
535
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
536
+ platformRaw: string;
537
+ };
538
+ platform: string;
539
+ schemaVersion: 1;
540
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
541
+ platformEntityId: string;
542
+ displayName: string | null;
543
+ accountId: string | null;
544
+ budget: {
545
+ daily?: {
546
+ amountMinor: number;
547
+ currency: string;
548
+ } | null | undefined;
549
+ lifetime?: {
550
+ amountMinor: number;
551
+ currency: string;
552
+ } | null | undefined;
553
+ segments?: {
554
+ amountMinor: number;
555
+ currency: string;
556
+ startAt: string | null;
557
+ endAt: string | null;
558
+ }[] | null | undefined;
559
+ };
560
+ schedule: {
561
+ startAt: string | null;
562
+ endAt: string | null;
563
+ };
564
+ }>>;
565
+ after: z.ZodOptional<z.ZodObject<{
566
+ schemaVersion: z.ZodLiteral<1>;
567
+ platform: z.ZodString;
568
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
569
+ platformEntityId: z.ZodString;
570
+ displayName: z.ZodNullable<z.ZodString>;
571
+ accountId: z.ZodNullable<z.ZodString>;
572
+ status: z.ZodObject<{
573
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
574
+ platformRaw: z.ZodString;
575
+ }, "strip", z.ZodTypeAny, {
576
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
577
+ platformRaw: string;
578
+ }, {
579
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
580
+ platformRaw: string;
581
+ }>;
582
+ budget: z.ZodObject<{
583
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
584
+ amountMinor: z.ZodNumber;
585
+ currency: z.ZodString;
586
+ }, "strip", z.ZodTypeAny, {
587
+ amountMinor: number;
588
+ currency: string;
589
+ }, {
590
+ amountMinor: number;
591
+ currency: string;
592
+ }>>>;
593
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
594
+ amountMinor: z.ZodNumber;
595
+ currency: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ amountMinor: number;
598
+ currency: string;
599
+ }, {
600
+ amountMinor: number;
601
+ currency: string;
602
+ }>>>;
603
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
604
+ amountMinor: z.ZodNumber;
605
+ currency: z.ZodString;
606
+ startAt: z.ZodNullable<z.ZodString>;
607
+ endAt: z.ZodNullable<z.ZodString>;
608
+ }, "strip", z.ZodTypeAny, {
609
+ amountMinor: number;
610
+ currency: string;
611
+ startAt: string | null;
612
+ endAt: string | null;
613
+ }, {
614
+ amountMinor: number;
615
+ currency: string;
616
+ startAt: string | null;
617
+ endAt: string | null;
618
+ }>, "many">>>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ daily?: {
621
+ amountMinor: number;
622
+ currency: string;
623
+ } | null | undefined;
624
+ lifetime?: {
625
+ amountMinor: number;
626
+ currency: string;
627
+ } | null | undefined;
628
+ segments?: {
629
+ amountMinor: number;
630
+ currency: string;
631
+ startAt: string | null;
632
+ endAt: string | null;
633
+ }[] | null | undefined;
634
+ }, {
635
+ daily?: {
636
+ amountMinor: number;
637
+ currency: string;
638
+ } | null | undefined;
639
+ lifetime?: {
640
+ amountMinor: number;
641
+ currency: string;
642
+ } | null | undefined;
643
+ segments?: {
644
+ amountMinor: number;
645
+ currency: string;
646
+ startAt: string | null;
647
+ endAt: string | null;
648
+ }[] | null | undefined;
649
+ }>;
650
+ schedule: z.ZodObject<{
651
+ startAt: z.ZodNullable<z.ZodString>;
652
+ endAt: z.ZodNullable<z.ZodString>;
653
+ }, "strip", z.ZodTypeAny, {
654
+ startAt: string | null;
655
+ endAt: string | null;
656
+ }, {
657
+ startAt: string | null;
658
+ endAt: string | null;
659
+ }>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ status: {
662
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
663
+ platformRaw: string;
664
+ };
665
+ platform: string;
666
+ schemaVersion: 1;
667
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
668
+ platformEntityId: string;
669
+ displayName: string | null;
670
+ accountId: string | null;
671
+ budget: {
672
+ daily?: {
673
+ amountMinor: number;
674
+ currency: string;
675
+ } | null | undefined;
676
+ lifetime?: {
677
+ amountMinor: number;
678
+ currency: string;
679
+ } | null | undefined;
680
+ segments?: {
681
+ amountMinor: number;
682
+ currency: string;
683
+ startAt: string | null;
684
+ endAt: string | null;
685
+ }[] | null | undefined;
686
+ };
687
+ schedule: {
688
+ startAt: string | null;
689
+ endAt: string | null;
690
+ };
691
+ }, {
692
+ status: {
693
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
694
+ platformRaw: string;
695
+ };
696
+ platform: string;
697
+ schemaVersion: 1;
698
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
699
+ platformEntityId: string;
700
+ displayName: string | null;
701
+ accountId: string | null;
702
+ budget: {
703
+ daily?: {
704
+ amountMinor: number;
705
+ currency: string;
706
+ } | null | undefined;
707
+ lifetime?: {
708
+ amountMinor: number;
709
+ currency: string;
710
+ } | null | undefined;
711
+ segments?: {
712
+ amountMinor: number;
713
+ currency: string;
714
+ startAt: string | null;
715
+ endAt: string | null;
716
+ }[] | null | undefined;
717
+ };
718
+ schedule: {
719
+ startAt: string | null;
720
+ endAt: string | null;
721
+ };
722
+ }>>;
723
+ dispatchedCapability: z.ZodObject<{
724
+ operation: z.ZodString;
725
+ canonicalEntityKind: z.ZodString;
726
+ }, "strip", z.ZodTypeAny, {
727
+ operation: string;
728
+ canonicalEntityKind: string;
729
+ }, {
730
+ operation: string;
731
+ canonicalEntityKind: string;
732
+ }>;
17
733
  }, "strip", z.ZodTypeAny, {
18
734
  entityType: string;
735
+ entityId: string;
19
736
  timestamp: string;
20
737
  result: Record<string, any>;
738
+ updated: boolean;
739
+ dispatchedCapability: {
740
+ operation: string;
741
+ canonicalEntityKind: string;
742
+ };
743
+ dryRun?: {
744
+ wouldSucceed: boolean;
745
+ validationErrors: {
746
+ code: string;
747
+ message: string;
748
+ field?: string | undefined;
749
+ }[];
750
+ validationSource: "native_validator" | "symbolic" | "none";
751
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
752
+ expectedPostState?: {
753
+ status: {
754
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
755
+ platformRaw: string;
756
+ };
757
+ platform: string;
758
+ schemaVersion: 1;
759
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
760
+ platformEntityId: string;
761
+ displayName: string | null;
762
+ accountId: string | null;
763
+ budget: {
764
+ daily?: {
765
+ amountMinor: number;
766
+ currency: string;
767
+ } | null | undefined;
768
+ lifetime?: {
769
+ amountMinor: number;
770
+ currency: string;
771
+ } | null | undefined;
772
+ segments?: {
773
+ amountMinor: number;
774
+ currency: string;
775
+ startAt: string | null;
776
+ endAt: string | null;
777
+ }[] | null | undefined;
778
+ };
779
+ schedule: {
780
+ startAt: string | null;
781
+ endAt: string | null;
782
+ };
783
+ } | undefined;
784
+ } | undefined;
785
+ before?: {
786
+ status: {
787
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
788
+ platformRaw: string;
789
+ };
790
+ platform: string;
791
+ schemaVersion: 1;
792
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
793
+ platformEntityId: string;
794
+ displayName: string | null;
795
+ accountId: string | null;
796
+ budget: {
797
+ daily?: {
798
+ amountMinor: number;
799
+ currency: string;
800
+ } | null | undefined;
801
+ lifetime?: {
802
+ amountMinor: number;
803
+ currency: string;
804
+ } | null | undefined;
805
+ segments?: {
806
+ amountMinor: number;
807
+ currency: string;
808
+ startAt: string | null;
809
+ endAt: string | null;
810
+ }[] | null | undefined;
811
+ };
812
+ schedule: {
813
+ startAt: string | null;
814
+ endAt: string | null;
815
+ };
816
+ } | undefined;
817
+ after?: {
818
+ status: {
819
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
820
+ platformRaw: string;
821
+ };
822
+ platform: string;
823
+ schemaVersion: 1;
824
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
825
+ platformEntityId: string;
826
+ displayName: string | null;
827
+ accountId: string | null;
828
+ budget: {
829
+ daily?: {
830
+ amountMinor: number;
831
+ currency: string;
832
+ } | null | undefined;
833
+ lifetime?: {
834
+ amountMinor: number;
835
+ currency: string;
836
+ } | null | undefined;
837
+ segments?: {
838
+ amountMinor: number;
839
+ currency: string;
840
+ startAt: string | null;
841
+ endAt: string | null;
842
+ }[] | null | undefined;
843
+ };
844
+ schedule: {
845
+ startAt: string | null;
846
+ endAt: string | null;
847
+ };
848
+ } | undefined;
21
849
  }, {
22
850
  entityType: string;
851
+ entityId: string;
23
852
  timestamp: string;
24
853
  result: Record<string, any>;
854
+ updated: boolean;
855
+ dispatchedCapability: {
856
+ operation: string;
857
+ canonicalEntityKind: string;
858
+ };
859
+ dryRun?: {
860
+ wouldSucceed: boolean;
861
+ validationErrors: {
862
+ code: string;
863
+ message: string;
864
+ field?: string | undefined;
865
+ }[];
866
+ validationSource: "native_validator" | "symbolic" | "none";
867
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
868
+ expectedPostState?: {
869
+ status: {
870
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
871
+ platformRaw: string;
872
+ };
873
+ platform: string;
874
+ schemaVersion: 1;
875
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
876
+ platformEntityId: string;
877
+ displayName: string | null;
878
+ accountId: string | null;
879
+ budget: {
880
+ daily?: {
881
+ amountMinor: number;
882
+ currency: string;
883
+ } | null | undefined;
884
+ lifetime?: {
885
+ amountMinor: number;
886
+ currency: string;
887
+ } | null | undefined;
888
+ segments?: {
889
+ amountMinor: number;
890
+ currency: string;
891
+ startAt: string | null;
892
+ endAt: string | null;
893
+ }[] | null | undefined;
894
+ };
895
+ schedule: {
896
+ startAt: string | null;
897
+ endAt: string | null;
898
+ };
899
+ } | undefined;
900
+ } | undefined;
901
+ before?: {
902
+ status: {
903
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
904
+ platformRaw: string;
905
+ };
906
+ platform: string;
907
+ schemaVersion: 1;
908
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
909
+ platformEntityId: string;
910
+ displayName: string | null;
911
+ accountId: string | null;
912
+ budget: {
913
+ daily?: {
914
+ amountMinor: number;
915
+ currency: string;
916
+ } | null | undefined;
917
+ lifetime?: {
918
+ amountMinor: number;
919
+ currency: string;
920
+ } | null | undefined;
921
+ segments?: {
922
+ amountMinor: number;
923
+ currency: string;
924
+ startAt: string | null;
925
+ endAt: string | null;
926
+ }[] | null | undefined;
927
+ };
928
+ schedule: {
929
+ startAt: string | null;
930
+ endAt: string | null;
931
+ };
932
+ } | undefined;
933
+ after?: {
934
+ status: {
935
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
936
+ platformRaw: string;
937
+ };
938
+ platform: string;
939
+ schemaVersion: 1;
940
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
941
+ platformEntityId: string;
942
+ displayName: string | null;
943
+ accountId: string | null;
944
+ budget: {
945
+ daily?: {
946
+ amountMinor: number;
947
+ currency: string;
948
+ } | null | undefined;
949
+ lifetime?: {
950
+ amountMinor: number;
951
+ currency: string;
952
+ } | null | undefined;
953
+ segments?: {
954
+ amountMinor: number;
955
+ currency: string;
956
+ startAt: string | null;
957
+ endAt: string | null;
958
+ }[] | null | undefined;
959
+ };
960
+ schedule: {
961
+ startAt: string | null;
962
+ endAt: string | null;
963
+ };
964
+ } | undefined;
25
965
  }>;
26
966
  type UpdateEntityInput = z.infer<typeof UpdateEntityInputSchema>;
27
967
  type UpdateEntityOutput = z.infer<typeof UpdateEntityOutputSchema>;
@@ -31,47 +971,1019 @@ export declare const updateEntityTool: {
31
971
  name: string;
32
972
  title: string;
33
973
  description: string;
34
- inputSchema: z.ZodObject<{
35
- entityType: z.ZodEnum<[string, ...string[]]>;
974
+ inputSchema: z.ZodDiscriminatedUnion<"entityType", [z.ZodObject<{
975
+ entityType: z.ZodLiteral<"campaign">;
976
+ entityId: z.ZodString;
977
+ accountId: z.ZodString;
36
978
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
979
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
37
980
  }, "strip", z.ZodTypeAny, {
38
- entityType: string;
981
+ entityType: "campaign";
982
+ accountId: string;
983
+ entityId: string;
39
984
  data: Record<string, unknown>;
985
+ dry_run: boolean;
40
986
  }, {
41
- entityType: string;
987
+ entityType: "campaign";
988
+ accountId: string;
989
+ entityId: string;
42
990
  data: Record<string, unknown>;
43
- }>;
991
+ dry_run?: boolean | undefined;
992
+ }>, z.ZodObject<{
993
+ entityType: z.ZodLiteral<"adGroup">;
994
+ entityId: z.ZodString;
995
+ campaignId: z.ZodString;
996
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
997
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
998
+ }, "strip", z.ZodTypeAny, {
999
+ entityType: "adGroup";
1000
+ entityId: string;
1001
+ campaignId: string;
1002
+ data: Record<string, unknown>;
1003
+ dry_run: boolean;
1004
+ }, {
1005
+ entityType: "adGroup";
1006
+ entityId: string;
1007
+ campaignId: string;
1008
+ data: Record<string, unknown>;
1009
+ dry_run?: boolean | undefined;
1010
+ }>, z.ZodObject<{
1011
+ entityType: z.ZodLiteral<"ad">;
1012
+ entityId: z.ZodString;
1013
+ adGroupId: z.ZodString;
1014
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1015
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ entityType: "ad";
1018
+ entityId: string;
1019
+ adGroupId: string;
1020
+ data: Record<string, unknown>;
1021
+ dry_run: boolean;
1022
+ }, {
1023
+ entityType: "ad";
1024
+ entityId: string;
1025
+ adGroupId: string;
1026
+ data: Record<string, unknown>;
1027
+ dry_run?: boolean | undefined;
1028
+ }>, z.ZodObject<{
1029
+ entityType: z.ZodLiteral<"keyword">;
1030
+ entityId: z.ZodString;
1031
+ adGroupId: z.ZodString;
1032
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1033
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1034
+ }, "strip", z.ZodTypeAny, {
1035
+ entityType: "keyword";
1036
+ entityId: string;
1037
+ adGroupId: string;
1038
+ data: Record<string, unknown>;
1039
+ dry_run: boolean;
1040
+ }, {
1041
+ entityType: "keyword";
1042
+ entityId: string;
1043
+ adGroupId: string;
1044
+ data: Record<string, unknown>;
1045
+ dry_run?: boolean | undefined;
1046
+ }>, z.ZodObject<{
1047
+ entityType: z.ZodLiteral<"budget">;
1048
+ entityId: z.ZodString;
1049
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1050
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1051
+ }, "strip", z.ZodTypeAny, {
1052
+ entityType: "budget";
1053
+ entityId: string;
1054
+ data: Record<string, unknown>;
1055
+ dry_run: boolean;
1056
+ }, {
1057
+ entityType: "budget";
1058
+ entityId: string;
1059
+ data: Record<string, unknown>;
1060
+ dry_run?: boolean | undefined;
1061
+ }>, z.ZodObject<{
1062
+ entityType: z.ZodLiteral<"adExtension">;
1063
+ entityId: z.ZodString;
1064
+ accountId: z.ZodString;
1065
+ adExtensionType: z.ZodString;
1066
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1067
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ entityType: "adExtension";
1070
+ accountId: string;
1071
+ entityId: string;
1072
+ adExtensionType: string;
1073
+ data: Record<string, unknown>;
1074
+ dry_run: boolean;
1075
+ }, {
1076
+ entityType: "adExtension";
1077
+ accountId: string;
1078
+ entityId: string;
1079
+ adExtensionType: string;
1080
+ data: Record<string, unknown>;
1081
+ dry_run?: boolean | undefined;
1082
+ }>, z.ZodObject<{
1083
+ entityType: z.ZodLiteral<"audience">;
1084
+ entityId: z.ZodString;
1085
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1086
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ entityType: "audience";
1089
+ entityId: string;
1090
+ data: Record<string, unknown>;
1091
+ dry_run: boolean;
1092
+ }, {
1093
+ entityType: "audience";
1094
+ entityId: string;
1095
+ data: Record<string, unknown>;
1096
+ dry_run?: boolean | undefined;
1097
+ }>, z.ZodObject<{
1098
+ entityType: z.ZodLiteral<"label">;
1099
+ entityId: z.ZodString;
1100
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1101
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ entityType: "label";
1104
+ entityId: string;
1105
+ data: Record<string, unknown>;
1106
+ dry_run: boolean;
1107
+ }, {
1108
+ entityType: "label";
1109
+ entityId: string;
1110
+ data: Record<string, unknown>;
1111
+ dry_run?: boolean | undefined;
1112
+ }>]>;
44
1113
  outputSchema: z.ZodObject<{
45
1114
  result: z.ZodRecord<z.ZodString, z.ZodAny>;
1115
+ entityId: z.ZodString;
46
1116
  entityType: z.ZodString;
1117
+ updated: z.ZodBoolean;
47
1118
  timestamp: z.ZodString;
1119
+ dryRun: z.ZodOptional<z.ZodObject<{
1120
+ wouldSucceed: z.ZodBoolean;
1121
+ validationErrors: z.ZodArray<z.ZodObject<{
1122
+ code: z.ZodString;
1123
+ message: z.ZodString;
1124
+ field: z.ZodOptional<z.ZodString>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ code: string;
1127
+ message: string;
1128
+ field?: string | undefined;
1129
+ }, {
1130
+ code: string;
1131
+ message: string;
1132
+ field?: string | undefined;
1133
+ }>, "many">;
1134
+ validationSource: z.ZodEnum<["native_validator", "symbolic", "none"]>;
1135
+ expectedStateSource: z.ZodEnum<["native_simulator", "server_symbolic_apply", "none"]>;
1136
+ expectedPostState: z.ZodOptional<z.ZodObject<{
1137
+ schemaVersion: z.ZodLiteral<1>;
1138
+ platform: z.ZodString;
1139
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
1140
+ platformEntityId: z.ZodString;
1141
+ displayName: z.ZodNullable<z.ZodString>;
1142
+ accountId: z.ZodNullable<z.ZodString>;
1143
+ status: z.ZodObject<{
1144
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
1145
+ platformRaw: z.ZodString;
1146
+ }, "strip", z.ZodTypeAny, {
1147
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1148
+ platformRaw: string;
1149
+ }, {
1150
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1151
+ platformRaw: string;
1152
+ }>;
1153
+ budget: z.ZodObject<{
1154
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1155
+ amountMinor: z.ZodNumber;
1156
+ currency: z.ZodString;
1157
+ }, "strip", z.ZodTypeAny, {
1158
+ amountMinor: number;
1159
+ currency: string;
1160
+ }, {
1161
+ amountMinor: number;
1162
+ currency: string;
1163
+ }>>>;
1164
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1165
+ amountMinor: z.ZodNumber;
1166
+ currency: z.ZodString;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ amountMinor: number;
1169
+ currency: string;
1170
+ }, {
1171
+ amountMinor: number;
1172
+ currency: string;
1173
+ }>>>;
1174
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1175
+ amountMinor: z.ZodNumber;
1176
+ currency: z.ZodString;
1177
+ startAt: z.ZodNullable<z.ZodString>;
1178
+ endAt: z.ZodNullable<z.ZodString>;
1179
+ }, "strip", z.ZodTypeAny, {
1180
+ amountMinor: number;
1181
+ currency: string;
1182
+ startAt: string | null;
1183
+ endAt: string | null;
1184
+ }, {
1185
+ amountMinor: number;
1186
+ currency: string;
1187
+ startAt: string | null;
1188
+ endAt: string | null;
1189
+ }>, "many">>>;
1190
+ }, "strip", z.ZodTypeAny, {
1191
+ daily?: {
1192
+ amountMinor: number;
1193
+ currency: string;
1194
+ } | null | undefined;
1195
+ lifetime?: {
1196
+ amountMinor: number;
1197
+ currency: string;
1198
+ } | null | undefined;
1199
+ segments?: {
1200
+ amountMinor: number;
1201
+ currency: string;
1202
+ startAt: string | null;
1203
+ endAt: string | null;
1204
+ }[] | null | undefined;
1205
+ }, {
1206
+ daily?: {
1207
+ amountMinor: number;
1208
+ currency: string;
1209
+ } | null | undefined;
1210
+ lifetime?: {
1211
+ amountMinor: number;
1212
+ currency: string;
1213
+ } | null | undefined;
1214
+ segments?: {
1215
+ amountMinor: number;
1216
+ currency: string;
1217
+ startAt: string | null;
1218
+ endAt: string | null;
1219
+ }[] | null | undefined;
1220
+ }>;
1221
+ schedule: z.ZodObject<{
1222
+ startAt: z.ZodNullable<z.ZodString>;
1223
+ endAt: z.ZodNullable<z.ZodString>;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ startAt: string | null;
1226
+ endAt: string | null;
1227
+ }, {
1228
+ startAt: string | null;
1229
+ endAt: string | null;
1230
+ }>;
1231
+ }, "strip", z.ZodTypeAny, {
1232
+ status: {
1233
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1234
+ platformRaw: string;
1235
+ };
1236
+ platform: string;
1237
+ schemaVersion: 1;
1238
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1239
+ platformEntityId: string;
1240
+ displayName: string | null;
1241
+ accountId: string | null;
1242
+ budget: {
1243
+ daily?: {
1244
+ amountMinor: number;
1245
+ currency: string;
1246
+ } | null | undefined;
1247
+ lifetime?: {
1248
+ amountMinor: number;
1249
+ currency: string;
1250
+ } | null | undefined;
1251
+ segments?: {
1252
+ amountMinor: number;
1253
+ currency: string;
1254
+ startAt: string | null;
1255
+ endAt: string | null;
1256
+ }[] | null | undefined;
1257
+ };
1258
+ schedule: {
1259
+ startAt: string | null;
1260
+ endAt: string | null;
1261
+ };
1262
+ }, {
1263
+ status: {
1264
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1265
+ platformRaw: string;
1266
+ };
1267
+ platform: string;
1268
+ schemaVersion: 1;
1269
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1270
+ platformEntityId: string;
1271
+ displayName: string | null;
1272
+ accountId: string | null;
1273
+ budget: {
1274
+ daily?: {
1275
+ amountMinor: number;
1276
+ currency: string;
1277
+ } | null | undefined;
1278
+ lifetime?: {
1279
+ amountMinor: number;
1280
+ currency: string;
1281
+ } | null | undefined;
1282
+ segments?: {
1283
+ amountMinor: number;
1284
+ currency: string;
1285
+ startAt: string | null;
1286
+ endAt: string | null;
1287
+ }[] | null | undefined;
1288
+ };
1289
+ schedule: {
1290
+ startAt: string | null;
1291
+ endAt: string | null;
1292
+ };
1293
+ }>>;
1294
+ }, "strip", z.ZodTypeAny, {
1295
+ wouldSucceed: boolean;
1296
+ validationErrors: {
1297
+ code: string;
1298
+ message: string;
1299
+ field?: string | undefined;
1300
+ }[];
1301
+ validationSource: "native_validator" | "symbolic" | "none";
1302
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
1303
+ expectedPostState?: {
1304
+ status: {
1305
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1306
+ platformRaw: string;
1307
+ };
1308
+ platform: string;
1309
+ schemaVersion: 1;
1310
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1311
+ platformEntityId: string;
1312
+ displayName: string | null;
1313
+ accountId: string | null;
1314
+ budget: {
1315
+ daily?: {
1316
+ amountMinor: number;
1317
+ currency: string;
1318
+ } | null | undefined;
1319
+ lifetime?: {
1320
+ amountMinor: number;
1321
+ currency: string;
1322
+ } | null | undefined;
1323
+ segments?: {
1324
+ amountMinor: number;
1325
+ currency: string;
1326
+ startAt: string | null;
1327
+ endAt: string | null;
1328
+ }[] | null | undefined;
1329
+ };
1330
+ schedule: {
1331
+ startAt: string | null;
1332
+ endAt: string | null;
1333
+ };
1334
+ } | undefined;
1335
+ }, {
1336
+ wouldSucceed: boolean;
1337
+ validationErrors: {
1338
+ code: string;
1339
+ message: string;
1340
+ field?: string | undefined;
1341
+ }[];
1342
+ validationSource: "native_validator" | "symbolic" | "none";
1343
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
1344
+ expectedPostState?: {
1345
+ status: {
1346
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1347
+ platformRaw: string;
1348
+ };
1349
+ platform: string;
1350
+ schemaVersion: 1;
1351
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1352
+ platformEntityId: string;
1353
+ displayName: string | null;
1354
+ accountId: string | null;
1355
+ budget: {
1356
+ daily?: {
1357
+ amountMinor: number;
1358
+ currency: string;
1359
+ } | null | undefined;
1360
+ lifetime?: {
1361
+ amountMinor: number;
1362
+ currency: string;
1363
+ } | null | undefined;
1364
+ segments?: {
1365
+ amountMinor: number;
1366
+ currency: string;
1367
+ startAt: string | null;
1368
+ endAt: string | null;
1369
+ }[] | null | undefined;
1370
+ };
1371
+ schedule: {
1372
+ startAt: string | null;
1373
+ endAt: string | null;
1374
+ };
1375
+ } | undefined;
1376
+ }>>;
1377
+ before: z.ZodOptional<z.ZodObject<{
1378
+ schemaVersion: z.ZodLiteral<1>;
1379
+ platform: z.ZodString;
1380
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
1381
+ platformEntityId: z.ZodString;
1382
+ displayName: z.ZodNullable<z.ZodString>;
1383
+ accountId: z.ZodNullable<z.ZodString>;
1384
+ status: z.ZodObject<{
1385
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
1386
+ platformRaw: z.ZodString;
1387
+ }, "strip", z.ZodTypeAny, {
1388
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1389
+ platformRaw: string;
1390
+ }, {
1391
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1392
+ platformRaw: string;
1393
+ }>;
1394
+ budget: z.ZodObject<{
1395
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1396
+ amountMinor: z.ZodNumber;
1397
+ currency: z.ZodString;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ amountMinor: number;
1400
+ currency: string;
1401
+ }, {
1402
+ amountMinor: number;
1403
+ currency: string;
1404
+ }>>>;
1405
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1406
+ amountMinor: z.ZodNumber;
1407
+ currency: z.ZodString;
1408
+ }, "strip", z.ZodTypeAny, {
1409
+ amountMinor: number;
1410
+ currency: string;
1411
+ }, {
1412
+ amountMinor: number;
1413
+ currency: string;
1414
+ }>>>;
1415
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1416
+ amountMinor: z.ZodNumber;
1417
+ currency: z.ZodString;
1418
+ startAt: z.ZodNullable<z.ZodString>;
1419
+ endAt: z.ZodNullable<z.ZodString>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ amountMinor: number;
1422
+ currency: string;
1423
+ startAt: string | null;
1424
+ endAt: string | null;
1425
+ }, {
1426
+ amountMinor: number;
1427
+ currency: string;
1428
+ startAt: string | null;
1429
+ endAt: string | null;
1430
+ }>, "many">>>;
1431
+ }, "strip", z.ZodTypeAny, {
1432
+ daily?: {
1433
+ amountMinor: number;
1434
+ currency: string;
1435
+ } | null | undefined;
1436
+ lifetime?: {
1437
+ amountMinor: number;
1438
+ currency: string;
1439
+ } | null | undefined;
1440
+ segments?: {
1441
+ amountMinor: number;
1442
+ currency: string;
1443
+ startAt: string | null;
1444
+ endAt: string | null;
1445
+ }[] | null | undefined;
1446
+ }, {
1447
+ daily?: {
1448
+ amountMinor: number;
1449
+ currency: string;
1450
+ } | null | undefined;
1451
+ lifetime?: {
1452
+ amountMinor: number;
1453
+ currency: string;
1454
+ } | null | undefined;
1455
+ segments?: {
1456
+ amountMinor: number;
1457
+ currency: string;
1458
+ startAt: string | null;
1459
+ endAt: string | null;
1460
+ }[] | null | undefined;
1461
+ }>;
1462
+ schedule: z.ZodObject<{
1463
+ startAt: z.ZodNullable<z.ZodString>;
1464
+ endAt: z.ZodNullable<z.ZodString>;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ startAt: string | null;
1467
+ endAt: string | null;
1468
+ }, {
1469
+ startAt: string | null;
1470
+ endAt: string | null;
1471
+ }>;
1472
+ }, "strip", z.ZodTypeAny, {
1473
+ status: {
1474
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1475
+ platformRaw: string;
1476
+ };
1477
+ platform: string;
1478
+ schemaVersion: 1;
1479
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1480
+ platformEntityId: string;
1481
+ displayName: string | null;
1482
+ accountId: string | null;
1483
+ budget: {
1484
+ daily?: {
1485
+ amountMinor: number;
1486
+ currency: string;
1487
+ } | null | undefined;
1488
+ lifetime?: {
1489
+ amountMinor: number;
1490
+ currency: string;
1491
+ } | null | undefined;
1492
+ segments?: {
1493
+ amountMinor: number;
1494
+ currency: string;
1495
+ startAt: string | null;
1496
+ endAt: string | null;
1497
+ }[] | null | undefined;
1498
+ };
1499
+ schedule: {
1500
+ startAt: string | null;
1501
+ endAt: string | null;
1502
+ };
1503
+ }, {
1504
+ status: {
1505
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1506
+ platformRaw: string;
1507
+ };
1508
+ platform: string;
1509
+ schemaVersion: 1;
1510
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1511
+ platformEntityId: string;
1512
+ displayName: string | null;
1513
+ accountId: string | null;
1514
+ budget: {
1515
+ daily?: {
1516
+ amountMinor: number;
1517
+ currency: string;
1518
+ } | null | undefined;
1519
+ lifetime?: {
1520
+ amountMinor: number;
1521
+ currency: string;
1522
+ } | null | undefined;
1523
+ segments?: {
1524
+ amountMinor: number;
1525
+ currency: string;
1526
+ startAt: string | null;
1527
+ endAt: string | null;
1528
+ }[] | null | undefined;
1529
+ };
1530
+ schedule: {
1531
+ startAt: string | null;
1532
+ endAt: string | null;
1533
+ };
1534
+ }>>;
1535
+ after: z.ZodOptional<z.ZodObject<{
1536
+ schemaVersion: z.ZodLiteral<1>;
1537
+ platform: z.ZodString;
1538
+ entityKind: z.ZodEnum<["campaign", "ad_set", "insertion_order", "line_item", "ad_group", "ad", "campaign_budget", "order", "commitment"]>;
1539
+ platformEntityId: z.ZodString;
1540
+ displayName: z.ZodNullable<z.ZodString>;
1541
+ accountId: z.ZodNullable<z.ZodString>;
1542
+ status: z.ZodObject<{
1543
+ canonical: z.ZodEnum<["active", "paused", "archived", "deleted", "unknown"]>;
1544
+ platformRaw: z.ZodString;
1545
+ }, "strip", z.ZodTypeAny, {
1546
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1547
+ platformRaw: string;
1548
+ }, {
1549
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1550
+ platformRaw: string;
1551
+ }>;
1552
+ budget: z.ZodObject<{
1553
+ daily: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1554
+ amountMinor: z.ZodNumber;
1555
+ currency: z.ZodString;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ amountMinor: number;
1558
+ currency: string;
1559
+ }, {
1560
+ amountMinor: number;
1561
+ currency: string;
1562
+ }>>>;
1563
+ lifetime: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1564
+ amountMinor: z.ZodNumber;
1565
+ currency: z.ZodString;
1566
+ }, "strip", z.ZodTypeAny, {
1567
+ amountMinor: number;
1568
+ currency: string;
1569
+ }, {
1570
+ amountMinor: number;
1571
+ currency: string;
1572
+ }>>>;
1573
+ segments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1574
+ amountMinor: z.ZodNumber;
1575
+ currency: z.ZodString;
1576
+ startAt: z.ZodNullable<z.ZodString>;
1577
+ endAt: z.ZodNullable<z.ZodString>;
1578
+ }, "strip", z.ZodTypeAny, {
1579
+ amountMinor: number;
1580
+ currency: string;
1581
+ startAt: string | null;
1582
+ endAt: string | null;
1583
+ }, {
1584
+ amountMinor: number;
1585
+ currency: string;
1586
+ startAt: string | null;
1587
+ endAt: string | null;
1588
+ }>, "many">>>;
1589
+ }, "strip", z.ZodTypeAny, {
1590
+ daily?: {
1591
+ amountMinor: number;
1592
+ currency: string;
1593
+ } | null | undefined;
1594
+ lifetime?: {
1595
+ amountMinor: number;
1596
+ currency: string;
1597
+ } | null | undefined;
1598
+ segments?: {
1599
+ amountMinor: number;
1600
+ currency: string;
1601
+ startAt: string | null;
1602
+ endAt: string | null;
1603
+ }[] | null | undefined;
1604
+ }, {
1605
+ daily?: {
1606
+ amountMinor: number;
1607
+ currency: string;
1608
+ } | null | undefined;
1609
+ lifetime?: {
1610
+ amountMinor: number;
1611
+ currency: string;
1612
+ } | null | undefined;
1613
+ segments?: {
1614
+ amountMinor: number;
1615
+ currency: string;
1616
+ startAt: string | null;
1617
+ endAt: string | null;
1618
+ }[] | null | undefined;
1619
+ }>;
1620
+ schedule: z.ZodObject<{
1621
+ startAt: z.ZodNullable<z.ZodString>;
1622
+ endAt: z.ZodNullable<z.ZodString>;
1623
+ }, "strip", z.ZodTypeAny, {
1624
+ startAt: string | null;
1625
+ endAt: string | null;
1626
+ }, {
1627
+ startAt: string | null;
1628
+ endAt: string | null;
1629
+ }>;
1630
+ }, "strip", z.ZodTypeAny, {
1631
+ status: {
1632
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1633
+ platformRaw: string;
1634
+ };
1635
+ platform: string;
1636
+ schemaVersion: 1;
1637
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1638
+ platformEntityId: string;
1639
+ displayName: string | null;
1640
+ accountId: string | null;
1641
+ budget: {
1642
+ daily?: {
1643
+ amountMinor: number;
1644
+ currency: string;
1645
+ } | null | undefined;
1646
+ lifetime?: {
1647
+ amountMinor: number;
1648
+ currency: string;
1649
+ } | null | undefined;
1650
+ segments?: {
1651
+ amountMinor: number;
1652
+ currency: string;
1653
+ startAt: string | null;
1654
+ endAt: string | null;
1655
+ }[] | null | undefined;
1656
+ };
1657
+ schedule: {
1658
+ startAt: string | null;
1659
+ endAt: string | null;
1660
+ };
1661
+ }, {
1662
+ status: {
1663
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1664
+ platformRaw: string;
1665
+ };
1666
+ platform: string;
1667
+ schemaVersion: 1;
1668
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1669
+ platformEntityId: string;
1670
+ displayName: string | null;
1671
+ accountId: string | null;
1672
+ budget: {
1673
+ daily?: {
1674
+ amountMinor: number;
1675
+ currency: string;
1676
+ } | null | undefined;
1677
+ lifetime?: {
1678
+ amountMinor: number;
1679
+ currency: string;
1680
+ } | null | undefined;
1681
+ segments?: {
1682
+ amountMinor: number;
1683
+ currency: string;
1684
+ startAt: string | null;
1685
+ endAt: string | null;
1686
+ }[] | null | undefined;
1687
+ };
1688
+ schedule: {
1689
+ startAt: string | null;
1690
+ endAt: string | null;
1691
+ };
1692
+ }>>;
1693
+ dispatchedCapability: z.ZodObject<{
1694
+ operation: z.ZodString;
1695
+ canonicalEntityKind: z.ZodString;
1696
+ }, "strip", z.ZodTypeAny, {
1697
+ operation: string;
1698
+ canonicalEntityKind: string;
1699
+ }, {
1700
+ operation: string;
1701
+ canonicalEntityKind: string;
1702
+ }>;
48
1703
  }, "strip", z.ZodTypeAny, {
49
1704
  entityType: string;
1705
+ entityId: string;
50
1706
  timestamp: string;
51
1707
  result: Record<string, any>;
1708
+ updated: boolean;
1709
+ dispatchedCapability: {
1710
+ operation: string;
1711
+ canonicalEntityKind: string;
1712
+ };
1713
+ dryRun?: {
1714
+ wouldSucceed: boolean;
1715
+ validationErrors: {
1716
+ code: string;
1717
+ message: string;
1718
+ field?: string | undefined;
1719
+ }[];
1720
+ validationSource: "native_validator" | "symbolic" | "none";
1721
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
1722
+ expectedPostState?: {
1723
+ status: {
1724
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1725
+ platformRaw: string;
1726
+ };
1727
+ platform: string;
1728
+ schemaVersion: 1;
1729
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1730
+ platformEntityId: string;
1731
+ displayName: string | null;
1732
+ accountId: string | null;
1733
+ budget: {
1734
+ daily?: {
1735
+ amountMinor: number;
1736
+ currency: string;
1737
+ } | null | undefined;
1738
+ lifetime?: {
1739
+ amountMinor: number;
1740
+ currency: string;
1741
+ } | null | undefined;
1742
+ segments?: {
1743
+ amountMinor: number;
1744
+ currency: string;
1745
+ startAt: string | null;
1746
+ endAt: string | null;
1747
+ }[] | null | undefined;
1748
+ };
1749
+ schedule: {
1750
+ startAt: string | null;
1751
+ endAt: string | null;
1752
+ };
1753
+ } | undefined;
1754
+ } | undefined;
1755
+ before?: {
1756
+ status: {
1757
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1758
+ platformRaw: string;
1759
+ };
1760
+ platform: string;
1761
+ schemaVersion: 1;
1762
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1763
+ platformEntityId: string;
1764
+ displayName: string | null;
1765
+ accountId: string | null;
1766
+ budget: {
1767
+ daily?: {
1768
+ amountMinor: number;
1769
+ currency: string;
1770
+ } | null | undefined;
1771
+ lifetime?: {
1772
+ amountMinor: number;
1773
+ currency: string;
1774
+ } | null | undefined;
1775
+ segments?: {
1776
+ amountMinor: number;
1777
+ currency: string;
1778
+ startAt: string | null;
1779
+ endAt: string | null;
1780
+ }[] | null | undefined;
1781
+ };
1782
+ schedule: {
1783
+ startAt: string | null;
1784
+ endAt: string | null;
1785
+ };
1786
+ } | undefined;
1787
+ after?: {
1788
+ status: {
1789
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1790
+ platformRaw: string;
1791
+ };
1792
+ platform: string;
1793
+ schemaVersion: 1;
1794
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1795
+ platformEntityId: string;
1796
+ displayName: string | null;
1797
+ accountId: string | null;
1798
+ budget: {
1799
+ daily?: {
1800
+ amountMinor: number;
1801
+ currency: string;
1802
+ } | null | undefined;
1803
+ lifetime?: {
1804
+ amountMinor: number;
1805
+ currency: string;
1806
+ } | null | undefined;
1807
+ segments?: {
1808
+ amountMinor: number;
1809
+ currency: string;
1810
+ startAt: string | null;
1811
+ endAt: string | null;
1812
+ }[] | null | undefined;
1813
+ };
1814
+ schedule: {
1815
+ startAt: string | null;
1816
+ endAt: string | null;
1817
+ };
1818
+ } | undefined;
52
1819
  }, {
53
1820
  entityType: string;
1821
+ entityId: string;
54
1822
  timestamp: string;
55
1823
  result: Record<string, any>;
1824
+ updated: boolean;
1825
+ dispatchedCapability: {
1826
+ operation: string;
1827
+ canonicalEntityKind: string;
1828
+ };
1829
+ dryRun?: {
1830
+ wouldSucceed: boolean;
1831
+ validationErrors: {
1832
+ code: string;
1833
+ message: string;
1834
+ field?: string | undefined;
1835
+ }[];
1836
+ validationSource: "native_validator" | "symbolic" | "none";
1837
+ expectedStateSource: "none" | "native_simulator" | "server_symbolic_apply";
1838
+ expectedPostState?: {
1839
+ status: {
1840
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1841
+ platformRaw: string;
1842
+ };
1843
+ platform: string;
1844
+ schemaVersion: 1;
1845
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1846
+ platformEntityId: string;
1847
+ displayName: string | null;
1848
+ accountId: string | null;
1849
+ budget: {
1850
+ daily?: {
1851
+ amountMinor: number;
1852
+ currency: string;
1853
+ } | null | undefined;
1854
+ lifetime?: {
1855
+ amountMinor: number;
1856
+ currency: string;
1857
+ } | null | undefined;
1858
+ segments?: {
1859
+ amountMinor: number;
1860
+ currency: string;
1861
+ startAt: string | null;
1862
+ endAt: string | null;
1863
+ }[] | null | undefined;
1864
+ };
1865
+ schedule: {
1866
+ startAt: string | null;
1867
+ endAt: string | null;
1868
+ };
1869
+ } | undefined;
1870
+ } | undefined;
1871
+ before?: {
1872
+ status: {
1873
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1874
+ platformRaw: string;
1875
+ };
1876
+ platform: string;
1877
+ schemaVersion: 1;
1878
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1879
+ platformEntityId: string;
1880
+ displayName: string | null;
1881
+ accountId: string | null;
1882
+ budget: {
1883
+ daily?: {
1884
+ amountMinor: number;
1885
+ currency: string;
1886
+ } | null | undefined;
1887
+ lifetime?: {
1888
+ amountMinor: number;
1889
+ currency: string;
1890
+ } | null | undefined;
1891
+ segments?: {
1892
+ amountMinor: number;
1893
+ currency: string;
1894
+ startAt: string | null;
1895
+ endAt: string | null;
1896
+ }[] | null | undefined;
1897
+ };
1898
+ schedule: {
1899
+ startAt: string | null;
1900
+ endAt: string | null;
1901
+ };
1902
+ } | undefined;
1903
+ after?: {
1904
+ status: {
1905
+ canonical: "unknown" | "active" | "paused" | "archived" | "deleted";
1906
+ platformRaw: string;
1907
+ };
1908
+ platform: string;
1909
+ schemaVersion: 1;
1910
+ entityKind: "campaign" | "ad_set" | "insertion_order" | "line_item" | "ad_group" | "ad" | "campaign_budget" | "order" | "commitment";
1911
+ platformEntityId: string;
1912
+ displayName: string | null;
1913
+ accountId: string | null;
1914
+ budget: {
1915
+ daily?: {
1916
+ amountMinor: number;
1917
+ currency: string;
1918
+ } | null | undefined;
1919
+ lifetime?: {
1920
+ amountMinor: number;
1921
+ currency: string;
1922
+ } | null | undefined;
1923
+ segments?: {
1924
+ amountMinor: number;
1925
+ currency: string;
1926
+ startAt: string | null;
1927
+ endAt: string | null;
1928
+ }[] | null | undefined;
1929
+ };
1930
+ schedule: {
1931
+ startAt: string | null;
1932
+ endAt: string | null;
1933
+ };
1934
+ } | undefined;
56
1935
  }>;
57
1936
  annotations: {
58
1937
  readOnlyHint: boolean;
59
1938
  openWorldHint: boolean;
60
1939
  idempotentHint: boolean;
61
1940
  destructiveHint: boolean;
1941
+ cesteral: {
1942
+ kind: "write";
1943
+ platform: string;
1944
+ contractPlatformSlug: string;
1945
+ contractToolSlug: string;
1946
+ operation: ("resume" | "pause" | "update_status" | "update_budget" | "update")[];
1947
+ entityKinds: ("campaign" | "ad" | "ad_group" | "campaign_budget")[];
1948
+ entityIdArgs: string[];
1949
+ readPartner: {
1950
+ toolName: string;
1951
+ argMap: {
1952
+ entityType: string;
1953
+ entityId: string;
1954
+ };
1955
+ };
1956
+ schemaVersion: number;
1957
+ contractId: string;
1958
+ supportsDryRun: true;
1959
+ supportsBeforeAfterSnapshot: true;
1960
+ requiresValidation: true;
1961
+ requiresSimulation: true;
1962
+ };
62
1963
  };
63
- inputExamples: {
1964
+ inputExamples: ({
1965
+ label: string;
1966
+ input: {
1967
+ entityType: string;
1968
+ entityId: string;
1969
+ accountId: string;
1970
+ data: {
1971
+ Status: string;
1972
+ Amount?: undefined;
1973
+ };
1974
+ };
1975
+ } | {
64
1976
  label: string;
65
1977
  input: {
66
1978
  entityType: string;
1979
+ entityId: string;
67
1980
  data: {
68
- Campaigns: {
69
- Id: number;
70
- Name: string;
71
- }[];
1981
+ Amount: number;
1982
+ Status?: undefined;
72
1983
  };
1984
+ accountId?: undefined;
73
1985
  };
74
- }[];
1986
+ })[];
75
1987
  logic: typeof updateEntityLogic;
76
1988
  responseFormatter: typeof updateEntityResponseFormatter;
77
1989
  };