@adport/provider-pinterest 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,22 +1,32 @@
1
- import { AdProvider, StandardActions, Account, NormalizedQuery, Report, WriteOperation, WriteGuard, WritePreview, WriteResult, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
1
+ import { WriteOperation, WriteGuard, WritePreview, MediaResolver, AdProvider, StandardActions, Account, NormalizedQuery, Report, WriteResult, AnyToolDefinition, CredentialStore, ProviderModule } from '@adport/core';
2
2
  import * as node_url from 'node:url';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const PINTEREST_API_BASE = "https://api.pinterest.com/v5/";
6
6
  declare const PINTEREST_TOKEN_URL = "https://api.pinterest.com/v5/oauth/token";
7
+ declare const PINTEREST_ADS_SCOPES: readonly ["ads:read", "ads:write"];
8
+ declare const PINTEREST_PIN_SCOPES: readonly ["ads:read", "ads:write", "boards:read", "boards:write", "pins:read", "pins:write", "user_accounts:read"];
9
+ declare const PINTEREST_SECRET_PIN_SCOPES: readonly ["ads:read", "ads:write", "boards:read", "boards:write", "pins:read", "pins:write", "user_accounts:read", "boards:read_secret", "boards:write_secret", "pins:read_secret", "pins:write_secret"];
10
+ declare const PINTEREST_CATALOG_SCOPES: readonly ["catalogs:read", "catalogs:write"];
11
+ interface PinterestAuthorizationOptions {
12
+ pinManagement?: boolean;
13
+ secretPins?: boolean;
14
+ catalogManagement?: boolean;
15
+ }
16
+ declare function pinterestAuthorizationScopes(options?: PinterestAuthorizationOptions): readonly string[];
7
17
  interface PinterestCredentials {
8
18
  clientId: string;
9
19
  clientSecret: string;
10
20
  refreshToken: string;
11
21
  onRefreshToken?: (refreshToken: string) => Promise<void>;
12
22
  }
13
- declare function buildPinterestAuthUrl(clientId: string, redirectUri: string, state: string): string;
23
+ declare function buildPinterestAuthUrl(clientId: string, redirectUri: string, state: string, options?: PinterestAuthorizationOptions): string;
14
24
  declare function exchangePinterestCode(input: {
15
25
  clientId: string;
16
26
  clientSecret: string;
17
27
  code: string;
18
28
  redirectUri: string;
19
- }, fetchImpl?: typeof fetch): Promise<string>;
29
+ } & PinterestAuthorizationOptions, fetchImpl?: typeof fetch): Promise<string>;
20
30
  declare class PinterestAdsClient {
21
31
  private readonly credentials;
22
32
  private readonly fetchImpl;
@@ -24,17 +34,1942 @@ declare class PinterestAdsClient {
24
34
  private refreshToken;
25
35
  private refreshing?;
26
36
  constructor(credentials: PinterestCredentials, fetchImpl?: typeof fetch);
37
+ catalogBatchReceipt(value: unknown): string;
38
+ verifyCatalogBatchReceipt(value: string): unknown;
27
39
  get<T>(path: string, schema: z.ZodType<T>, params?: node_url.URLSearchParams): Promise<T>;
28
- mutate<T>(path: string, method: 'POST' | 'PATCH', body: unknown, schema: z.ZodType<T>): Promise<T>;
40
+ mutate<T>(path: string, method: 'POST' | 'PATCH' | 'DELETE', body: unknown, schema: z.ZodType<T>, params?: node_url.URLSearchParams): Promise<T>;
41
+ uploadVideo(url: string, parameters: Record<string, string>, bytes: Uint8Array<ArrayBuffer>, name: string): Promise<void>;
29
42
  private request;
30
43
  private accessToken;
31
44
  private refresh;
32
45
  }
33
46
 
47
+ declare const accountSchema: z.ZodObject<{
48
+ id: z.ZodString;
49
+ name: z.ZodOptional<z.ZodString>;
50
+ currency: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$loose>;
52
+ declare const campaignSchema: z.ZodObject<{
53
+ id: z.ZodString;
54
+ ad_account_id: z.ZodString;
55
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ status: z.ZodOptional<z.ZodEnum<{
57
+ ACTIVE: "ACTIVE";
58
+ PAUSED: "PAUSED";
59
+ ARCHIVED: "ARCHIVED";
60
+ DRAFT: "DRAFT";
61
+ DELETED_DRAFT: "DELETED_DRAFT";
62
+ }>>;
63
+ daily_spend_cap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
64
+ lifetime_spend_cap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
65
+ is_campaign_budget_optimization: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
66
+ is_flexible_daily_budgets: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
67
+ }, z.core.$loose>;
68
+ declare const createCampaignSchema: z.ZodObject<{
69
+ name: z.ZodString;
70
+ objective_type: z.ZodEnum<{
71
+ AWARENESS: "AWARENESS";
72
+ CONSIDERATION: "CONSIDERATION";
73
+ WEB_CONVERSION: "WEB_CONVERSION";
74
+ CATALOG_SALES: "CATALOG_SALES";
75
+ VIDEO_COMPLETION: "VIDEO_COMPLETION";
76
+ APP_INSTALL: "APP_INSTALL";
77
+ SALES: "SALES";
78
+ LEADS: "LEADS";
79
+ CTV_CONSIDERATION: "CTV_CONSIDERATION";
80
+ }>;
81
+ status: z.ZodDefault<z.ZodEnum<{
82
+ ACTIVE: "ACTIVE";
83
+ PAUSED: "PAUSED";
84
+ }>>;
85
+ budget_type: z.ZodDefault<z.ZodEnum<{
86
+ DAILY: "DAILY";
87
+ LIFETIME: "LIFETIME";
88
+ }>>;
89
+ daily_budget_mode: z.ZodDefault<z.ZodEnum<{
90
+ FIXED: "FIXED";
91
+ AVERAGE: "AVERAGE";
92
+ }>>;
93
+ acknowledge_variable_daily_spend: z.ZodOptional<z.ZodLiteral<true>>;
94
+ budget_micros: z.ZodNumber;
95
+ start_time: z.ZodOptional<z.ZodNumber>;
96
+ end_time: z.ZodOptional<z.ZodNumber>;
97
+ app_id: z.ZodOptional<z.ZodString>;
98
+ app_platform: z.ZodOptional<z.ZodEnum<{
99
+ IOS: "IOS";
100
+ ANDROID: "ANDROID";
101
+ }>>;
102
+ }, z.core.$strip>;
103
+
104
+ type Row$4 = Record<string, unknown>;
105
+ interface Page$1 {
106
+ account_id: string;
107
+ page_size: number;
108
+ bookmark?: string;
109
+ }
110
+ interface Plan$a extends Omit<WritePreview, 'serverValidated'> {
111
+ execute: () => Promise<string[]>;
112
+ }
113
+ /** Native batch and targeting contracts from Pinterest-owned v5 OpenAPI5.28.0. */
114
+ declare class PinterestCreativeService {
115
+ private readonly client;
116
+ private readonly campaign;
117
+ constructor(client: PinterestAdsClient, campaign: (account: string, id: string) => Promise<z.infer<typeof campaignSchema>>);
118
+ private base;
119
+ read(account: string, path: string): Promise<Record<string, unknown>>;
120
+ getEntity(account: string, entity: 'campaigns' | 'ad_groups' | 'ads', id: string): Promise<Row$4>;
121
+ page(input: Page$1 & Row$4, collection: 'ad_groups' | 'ads' | 'audiences'): Promise<{
122
+ next_cursor?: string | undefined;
123
+ truncated: boolean;
124
+ items: {
125
+ [x: string]: unknown;
126
+ id: string;
127
+ ad_account_id?: string | undefined;
128
+ }[];
129
+ bookmark?: string | null | undefined;
130
+ }>;
131
+ ads(input: Page$1 & Row$4): Promise<{
132
+ creatives: {
133
+ id: string;
134
+ provider: string;
135
+ account_id: string;
136
+ name: string;
137
+ type: string;
138
+ headlines: string[];
139
+ descriptions: string[];
140
+ landing_urls: string[];
141
+ media: {
142
+ type: "image" | "video" | "audio";
143
+ url: string;
144
+ alt?: string | undefined;
145
+ poster_url?: string | undefined;
146
+ open_url?: string | undefined;
147
+ }[];
148
+ actions: {
149
+ label: string;
150
+ tool: string;
151
+ arguments: Record<string, unknown>;
152
+ fields: {
153
+ key: string;
154
+ label: string;
155
+ type: "text" | "text_list" | "url_list" | "select";
156
+ value: string | string[];
157
+ options?: {
158
+ label: string;
159
+ value: string;
160
+ }[] | undefined;
161
+ max_length?: number | undefined;
162
+ }[];
163
+ }[];
164
+ status?: string | undefined;
165
+ campaign_id?: string | undefined;
166
+ ad_group_id?: string | undefined;
167
+ }[];
168
+ warnings: {
169
+ provider: string;
170
+ message: string;
171
+ }[];
172
+ next_cursor?: string | undefined;
173
+ truncated: boolean;
174
+ items: {
175
+ [x: string]: unknown;
176
+ id: string;
177
+ ad_account_id?: string | undefined;
178
+ }[];
179
+ bookmark?: string | null | undefined;
180
+ }>;
181
+ targetingOptions(account: string, type: string): Promise<Record<string, unknown>[]>;
182
+ estimate(input: {
183
+ account_id: string;
184
+ } & Row$4): Promise<Record<string, unknown>>;
185
+ private owned;
186
+ private batch;
187
+ private verifyOptimization;
188
+ plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$a>;
189
+ }
190
+
191
+ type Plan$9 = Omit<WritePreview, 'serverValidated'> & {
192
+ execute: () => Promise<string[]>;
193
+ };
194
+ type Page = {
195
+ account_id: string;
196
+ page_size: number;
197
+ bookmark?: string;
198
+ };
199
+ /** Contracts from Pinterest-owned v5 OpenAPI 5.28.0, fetched 2026-11-04. */
200
+ declare class PinterestAssetService {
201
+ private readonly client;
202
+ private readonly media;
203
+ constructor(client: PinterestAdsClient, media?: MediaResolver);
204
+ private params;
205
+ private account;
206
+ private ownedBoard;
207
+ private nativeOwner;
208
+ private page;
209
+ boards(input: Page & {
210
+ privacy?: 'ALL' | 'PUBLIC' | 'PROTECTED' | 'SECRET' | 'PUBLIC_AND_SECRET';
211
+ }): Promise<{
212
+ items: {
213
+ owned_by_advertiser: boolean;
214
+ id: string;
215
+ name: string;
216
+ privacy: "PUBLIC" | "PROTECTED" | "SECRET";
217
+ owner: {
218
+ username: string;
219
+ };
220
+ description?: string | null | undefined;
221
+ is_ads_only?: boolean | undefined;
222
+ pin_count?: number | undefined;
223
+ collaborator_count?: number | undefined;
224
+ follower_count?: number | undefined;
225
+ }[];
226
+ next_cursor?: string | undefined;
227
+ truncated: boolean;
228
+ bookmark?: string | null | undefined;
229
+ }>;
230
+ getBoard(account: string, boardId: string): Promise<{
231
+ board: {
232
+ [x: string]: unknown;
233
+ id: string;
234
+ name: string;
235
+ privacy: "PUBLIC" | "PROTECTED" | "SECRET";
236
+ owner: {
237
+ username: string;
238
+ };
239
+ description?: string | null | undefined;
240
+ is_ads_only?: boolean | undefined;
241
+ pin_count?: number | undefined;
242
+ collaborator_count?: number | undefined;
243
+ follower_count?: number | undefined;
244
+ };
245
+ snapshot_hash: string;
246
+ creatives: {
247
+ id: string;
248
+ provider: string;
249
+ account_id: string;
250
+ name: string;
251
+ type: string;
252
+ headlines: string[];
253
+ descriptions: string[];
254
+ landing_urls: string[];
255
+ media: {
256
+ type: "image" | "video" | "audio";
257
+ url: string;
258
+ alt?: string | undefined;
259
+ poster_url?: string | undefined;
260
+ open_url?: string | undefined;
261
+ }[];
262
+ actions: {
263
+ label: string;
264
+ tool: string;
265
+ arguments: Record<string, unknown>;
266
+ fields: {
267
+ key: string;
268
+ label: string;
269
+ type: "text" | "text_list" | "url_list" | "select";
270
+ value: string | string[];
271
+ options?: {
272
+ label: string;
273
+ value: string;
274
+ }[] | undefined;
275
+ max_length?: number | undefined;
276
+ }[];
277
+ }[];
278
+ status?: string | undefined;
279
+ campaign_id?: string | undefined;
280
+ ad_group_id?: string | undefined;
281
+ }[];
282
+ truncated: boolean;
283
+ notes: string[];
284
+ }>;
285
+ private requireEmptyBoard;
286
+ getPin(account: string, pinId: string): Promise<{
287
+ pin: {
288
+ [x: string]: unknown;
289
+ id: string;
290
+ board_id: string;
291
+ title?: string | null | undefined;
292
+ description?: string | null | undefined;
293
+ alt_text?: string | null | undefined;
294
+ link?: string | null | undefined;
295
+ is_owner?: boolean | undefined;
296
+ has_been_promoted?: boolean | undefined;
297
+ };
298
+ board: {
299
+ [x: string]: unknown;
300
+ id: string;
301
+ name: string;
302
+ privacy: "PUBLIC" | "PROTECTED" | "SECRET";
303
+ owner: {
304
+ username: string;
305
+ };
306
+ description?: string | null | undefined;
307
+ is_ads_only?: boolean | undefined;
308
+ pin_count?: number | undefined;
309
+ collaborator_count?: number | undefined;
310
+ follower_count?: number | undefined;
311
+ };
312
+ snapshot_hash: string;
313
+ creatives: {
314
+ id: string;
315
+ provider: string;
316
+ account_id: string;
317
+ name: string;
318
+ type: string;
319
+ headlines: string[];
320
+ descriptions: string[];
321
+ landing_urls: string[];
322
+ media: {
323
+ type: "image" | "video" | "audio";
324
+ url: string;
325
+ alt?: string | undefined;
326
+ poster_url?: string | undefined;
327
+ open_url?: string | undefined;
328
+ }[];
329
+ actions: {
330
+ label: string;
331
+ tool: string;
332
+ arguments: Record<string, unknown>;
333
+ fields: {
334
+ key: string;
335
+ label: string;
336
+ type: "text" | "text_list" | "url_list" | "select";
337
+ value: string | string[];
338
+ options?: {
339
+ label: string;
340
+ value: string;
341
+ }[] | undefined;
342
+ max_length?: number | undefined;
343
+ }[];
344
+ }[];
345
+ status?: string | undefined;
346
+ campaign_id?: string | undefined;
347
+ ad_group_id?: string | undefined;
348
+ }[];
349
+ truncated: boolean;
350
+ }>;
351
+ pins(input: Page & {
352
+ board_id?: string;
353
+ }): Promise<{
354
+ creatives: {
355
+ id: string;
356
+ provider: string;
357
+ account_id: string;
358
+ name: string;
359
+ type: string;
360
+ headlines: string[];
361
+ descriptions: string[];
362
+ landing_urls: string[];
363
+ media: {
364
+ type: "image" | "video" | "audio";
365
+ url: string;
366
+ alt?: string | undefined;
367
+ poster_url?: string | undefined;
368
+ open_url?: string | undefined;
369
+ }[];
370
+ actions: {
371
+ label: string;
372
+ tool: string;
373
+ arguments: Record<string, unknown>;
374
+ fields: {
375
+ key: string;
376
+ label: string;
377
+ type: "text" | "text_list" | "url_list" | "select";
378
+ value: string | string[];
379
+ options?: {
380
+ label: string;
381
+ value: string;
382
+ }[] | undefined;
383
+ max_length?: number | undefined;
384
+ }[];
385
+ }[];
386
+ status?: string | undefined;
387
+ campaign_id?: string | undefined;
388
+ ad_group_id?: string | undefined;
389
+ }[];
390
+ notes: string[];
391
+ next_cursor?: string | undefined;
392
+ truncated: boolean;
393
+ items: {
394
+ [x: string]: unknown;
395
+ id: string;
396
+ board_id: string;
397
+ title?: string | null | undefined;
398
+ description?: string | null | undefined;
399
+ alt_text?: string | null | undefined;
400
+ link?: string | null | undefined;
401
+ is_owner?: boolean | undefined;
402
+ has_been_promoted?: boolean | undefined;
403
+ }[];
404
+ bookmark?: string | null | undefined;
405
+ }>;
406
+ getMedia(account: string, mediaId: string): Promise<{
407
+ media_id: string;
408
+ media_type: "video";
409
+ status: "registered" | "processing" | "succeeded" | "failed";
410
+ }>;
411
+ private checkPublication;
412
+ private checkPinReceipt;
413
+ plan(op: WriteOperation): Promise<Plan$9>;
414
+ }
415
+
416
+ type Row$3 = Record<string, unknown>;
417
+ type Plan$8 = Omit<WritePreview, 'serverValidated'> & {
418
+ execute: () => Promise<string[]>;
419
+ };
420
+ declare const parent: z.ZodDiscriminatedUnion<[z.ZodObject<{
421
+ type: z.ZodLiteral<"account">;
422
+ }, z.core.$strict>, z.ZodObject<{
423
+ type: z.ZodLiteral<"campaign">;
424
+ campaign_id: z.ZodString;
425
+ }, z.core.$strict>, z.ZodObject<{
426
+ type: z.ZodLiteral<"ad_group">;
427
+ ad_group_id: z.ZodString;
428
+ }, z.core.$strict>], "type">;
429
+ declare const match: z.ZodEnum<{
430
+ BROAD: "BROAD";
431
+ PHRASE: "PHRASE";
432
+ EXACT: "EXACT";
433
+ EXACT_NEGATIVE: "EXACT_NEGATIVE";
434
+ PHRASE_NEGATIVE: "PHRASE_NEGATIVE";
435
+ }>;
436
+ type Parent = z.infer<typeof parent>;
437
+ /** Pinterest-owned v5 OpenAPI5.28.0 /keywords, fetched 2026-11-04. */
438
+ declare class PinterestKeywordService {
439
+ private readonly client;
440
+ private readonly entity;
441
+ constructor(client: PinterestAdsClient, entity: (account: string, type: 'campaigns' | 'ad_groups', resource: string) => Promise<Row$3>);
442
+ supports(tool: string): boolean;
443
+ private base;
444
+ context(account: string, selected: Parent): Promise<{
445
+ parent_snapshot_hash: string;
446
+ notes: string[];
447
+ campaign?: Row$3 | undefined;
448
+ entity: Row$3;
449
+ campaign_id?: unknown;
450
+ campaign_status?: {} | null | undefined;
451
+ account_id: string;
452
+ parent: {
453
+ type: "account";
454
+ } | {
455
+ type: "campaign";
456
+ campaign_id: string;
457
+ } | {
458
+ type: "ad_group";
459
+ ad_group_id: string;
460
+ };
461
+ parent_id: string;
462
+ status: {} | null;
463
+ }>;
464
+ private scoped;
465
+ private page;
466
+ private view;
467
+ list(input: {
468
+ account_id: string;
469
+ parent: Parent;
470
+ page_size: number;
471
+ bookmark?: string;
472
+ match_types?: z.infer<typeof match>[];
473
+ }): Promise<{
474
+ parent: {
475
+ type: "account";
476
+ } | {
477
+ type: "campaign";
478
+ campaign_id: string;
479
+ } | {
480
+ type: "ad_group";
481
+ ad_group_id: string;
482
+ };
483
+ parent_id: string;
484
+ parent_snapshot_hash: string;
485
+ items: {
486
+ snapshot_hash: string;
487
+ id: string;
488
+ parent_id: string;
489
+ match_type: "BROAD" | "PHRASE" | "EXACT" | "EXACT_NEGATIVE" | "PHRASE_NEGATIVE" | null;
490
+ value: string;
491
+ parent_type?: string | undefined;
492
+ archived?: boolean | undefined;
493
+ bid?: number | null | undefined;
494
+ }[];
495
+ creatives: {
496
+ id: string;
497
+ provider: string;
498
+ account_id: string;
499
+ name: string;
500
+ type: string;
501
+ headlines: string[];
502
+ descriptions: string[];
503
+ landing_urls: string[];
504
+ media: {
505
+ type: "image" | "video" | "audio";
506
+ url: string;
507
+ alt?: string | undefined;
508
+ poster_url?: string | undefined;
509
+ open_url?: string | undefined;
510
+ }[];
511
+ actions: {
512
+ label: string;
513
+ tool: string;
514
+ arguments: Record<string, unknown>;
515
+ fields: {
516
+ key: string;
517
+ label: string;
518
+ type: "text" | "text_list" | "url_list" | "select";
519
+ value: string | string[];
520
+ options?: {
521
+ label: string;
522
+ value: string;
523
+ }[] | undefined;
524
+ max_length?: number | undefined;
525
+ }[];
526
+ }[];
527
+ status?: string | undefined;
528
+ campaign_id?: string | undefined;
529
+ ad_group_id?: string | undefined;
530
+ }[];
531
+ notes: string[];
532
+ next_cursor?: string | undefined;
533
+ truncated: boolean;
534
+ bookmark?: string | null | undefined;
535
+ }>;
536
+ private find;
537
+ get(account: string, scope: Parent, keywordId: string): Promise<{
538
+ keyword: {
539
+ [x: string]: unknown;
540
+ id: string;
541
+ parent_id: string;
542
+ match_type: "BROAD" | "PHRASE" | "EXACT" | "EXACT_NEGATIVE" | "PHRASE_NEGATIVE" | null;
543
+ value: string;
544
+ parent_type?: string | undefined;
545
+ archived?: boolean | undefined;
546
+ bid?: number | null | undefined;
547
+ };
548
+ snapshot_hash: string;
549
+ parent_snapshot_hash: string;
550
+ creatives: {
551
+ id: string;
552
+ provider: string;
553
+ account_id: string;
554
+ name: string;
555
+ type: string;
556
+ headlines: string[];
557
+ descriptions: string[];
558
+ landing_urls: string[];
559
+ media: {
560
+ type: "image" | "video" | "audio";
561
+ url: string;
562
+ alt?: string | undefined;
563
+ poster_url?: string | undefined;
564
+ open_url?: string | undefined;
565
+ }[];
566
+ actions: {
567
+ label: string;
568
+ tool: string;
569
+ arguments: Record<string, unknown>;
570
+ fields: {
571
+ key: string;
572
+ label: string;
573
+ type: "text" | "text_list" | "url_list" | "select";
574
+ value: string | string[];
575
+ options?: {
576
+ label: string;
577
+ value: string;
578
+ }[] | undefined;
579
+ max_length?: number | undefined;
580
+ }[];
581
+ }[];
582
+ status?: string | undefined;
583
+ campaign_id?: string | undefined;
584
+ ad_group_id?: string | undefined;
585
+ }[];
586
+ truncated: boolean;
587
+ notes: string[];
588
+ }>;
589
+ metrics(input: {
590
+ account_id: string;
591
+ country_code: string;
592
+ keywords: string[];
593
+ }): Promise<{
594
+ country_code: string;
595
+ truncated: boolean;
596
+ planning: {
597
+ title: string;
598
+ columns: {
599
+ key: string;
600
+ label: string;
601
+ }[];
602
+ rows: {
603
+ keyword: string;
604
+ volume: string | null;
605
+ }[];
606
+ notes: string[];
607
+ };
608
+ data: {
609
+ [x: string]: unknown;
610
+ keyword: string;
611
+ metrics?: {
612
+ [x: string]: unknown;
613
+ keyword_query_volume?: string | undefined;
614
+ } | undefined;
615
+ }[];
616
+ }>;
617
+ private batch;
618
+ plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$8>;
619
+ }
620
+
621
+ type Row$2 = Record<string, unknown>;
622
+ type Plan$7 = Omit<WritePreview, 'serverValidated'> & {
623
+ execute: () => Promise<string[]>;
624
+ };
625
+ /** Pinterest-owned v5 OpenAPI5.28.0 audience/customer-list contracts, fetched2026-11-04. */
626
+ declare class PinterestAudienceService {
627
+ private readonly client;
628
+ private readonly entity;
629
+ private readonly pin;
630
+ constructor(client: PinterestAdsClient, entity: (account: string, type: 'campaigns' | 'ads', resource: string) => Promise<Row$2>, pin: (account: string, resource: string) => Promise<{
631
+ pin: Row$2;
632
+ }>);
633
+ supports(tool: string): boolean;
634
+ private base;
635
+ private page;
636
+ list(input: {
637
+ account_id: string;
638
+ ownership_type: 'OWNED' | 'RECEIVED';
639
+ page_size: number;
640
+ bookmark?: string;
641
+ }): Promise<{
642
+ items: {
643
+ owned_by_advertiser: boolean;
644
+ snapshot_hash: string;
645
+ id: string;
646
+ ad_account_id?: string | undefined;
647
+ name?: string | undefined;
648
+ description?: string | null | undefined;
649
+ audience_type?: string | undefined;
650
+ rule?: Record<string, unknown> | undefined;
651
+ is_nca?: boolean | undefined;
652
+ status?: string | undefined;
653
+ }[];
654
+ next_cursor?: string | undefined;
655
+ truncated: boolean;
656
+ bookmark?: string | null | undefined;
657
+ }>;
658
+ get(account: string, audienceId: string): Promise<{
659
+ audience: {
660
+ [x: string]: unknown;
661
+ id: string;
662
+ ad_account_id?: string | undefined;
663
+ name?: string | undefined;
664
+ description?: string | null | undefined;
665
+ audience_type?: string | undefined;
666
+ rule?: Record<string, unknown> | undefined;
667
+ is_nca?: boolean | undefined;
668
+ status?: string | undefined;
669
+ };
670
+ snapshot_hash: string;
671
+ creatives: {
672
+ id: string;
673
+ provider: string;
674
+ account_id: string;
675
+ name: string;
676
+ type: string;
677
+ headlines: string[];
678
+ descriptions: string[];
679
+ landing_urls: string[];
680
+ media: {
681
+ type: "image" | "video" | "audio";
682
+ url: string;
683
+ alt?: string | undefined;
684
+ poster_url?: string | undefined;
685
+ open_url?: string | undefined;
686
+ }[];
687
+ actions: {
688
+ label: string;
689
+ tool: string;
690
+ arguments: Record<string, unknown>;
691
+ fields: {
692
+ key: string;
693
+ label: string;
694
+ type: "text" | "text_list" | "url_list" | "select";
695
+ value: string | string[];
696
+ options?: {
697
+ label: string;
698
+ value: string;
699
+ }[] | undefined;
700
+ max_length?: number | undefined;
701
+ }[];
702
+ }[];
703
+ status?: string | undefined;
704
+ campaign_id?: string | undefined;
705
+ ad_group_id?: string | undefined;
706
+ }[];
707
+ truncated: boolean;
708
+ notes: string[];
709
+ }>;
710
+ getCustomerList(account: string, resource: string): Promise<{
711
+ customer_list: {
712
+ id: string;
713
+ name: string;
714
+ ad_account_id?: string | undefined;
715
+ is_nca?: boolean | undefined;
716
+ status?: string | undefined;
717
+ created_time?: number | undefined;
718
+ updated_time?: number | undefined;
719
+ num_batches?: number | undefined;
720
+ num_uploaded_user_records?: number | undefined;
721
+ num_removed_user_records?: number | undefined;
722
+ };
723
+ snapshot_hash: string;
724
+ has_exceptions: boolean;
725
+ notes: string[];
726
+ }>;
727
+ customerLists(input: {
728
+ account_id: string;
729
+ page_size: number;
730
+ bookmark?: string;
731
+ }): Promise<{
732
+ items: {
733
+ snapshot_hash: string;
734
+ id: string;
735
+ name: string;
736
+ ad_account_id?: string | undefined;
737
+ is_nca?: boolean | undefined;
738
+ status?: string | undefined;
739
+ created_time?: number | undefined;
740
+ updated_time?: number | undefined;
741
+ num_batches?: number | undefined;
742
+ num_uploaded_user_records?: number | undefined;
743
+ num_removed_user_records?: number | undefined;
744
+ }[];
745
+ next_cursor?: string | undefined;
746
+ truncated: boolean;
747
+ bookmark?: string | null | undefined;
748
+ }>;
749
+ sources(account: string): Promise<{
750
+ token_owner_matches: boolean;
751
+ websites: {
752
+ website: string;
753
+ status?: string;
754
+ verified_at?: string;
755
+ }[];
756
+ complete: boolean;
757
+ notes: string[];
758
+ }>;
759
+ private rule;
760
+ private inventory;
761
+ usage(account: string, resource: string): Promise<{
762
+ context_hash: string;
763
+ notes: string[];
764
+ snapshot_hash: string;
765
+ references: {
766
+ kind: string;
767
+ id: string;
768
+ status?: string;
769
+ targeting_dimensions?: string[];
770
+ snapshot_hash?: string;
771
+ }[];
772
+ shared_accounts: {
773
+ account_id: string;
774
+ account_type: "AD_ACCOUNT" | "BUSINESS_ACCOUNT";
775
+ }[];
776
+ scan_complete: boolean;
777
+ audience: {
778
+ [x: string]: unknown;
779
+ id: string;
780
+ ad_account_id?: string | undefined;
781
+ name?: string | undefined;
782
+ description?: string | null | undefined;
783
+ audience_type?: string | undefined;
784
+ rule?: Record<string, unknown> | undefined;
785
+ is_nca?: boolean | undefined;
786
+ status?: string | undefined;
787
+ };
788
+ creatives: {
789
+ id: string;
790
+ provider: string;
791
+ account_id: string;
792
+ name: string;
793
+ type: string;
794
+ headlines: string[];
795
+ descriptions: string[];
796
+ landing_urls: string[];
797
+ media: {
798
+ type: "image" | "video" | "audio";
799
+ url: string;
800
+ alt?: string | undefined;
801
+ poster_url?: string | undefined;
802
+ open_url?: string | undefined;
803
+ }[];
804
+ actions: {
805
+ label: string;
806
+ tool: string;
807
+ arguments: Record<string, unknown>;
808
+ fields: {
809
+ key: string;
810
+ label: string;
811
+ type: "text" | "text_list" | "url_list" | "select";
812
+ value: string | string[];
813
+ options?: {
814
+ label: string;
815
+ value: string;
816
+ }[] | undefined;
817
+ max_length?: number | undefined;
818
+ }[];
819
+ }[];
820
+ status?: string | undefined;
821
+ campaign_id?: string | undefined;
822
+ ad_group_id?: string | undefined;
823
+ }[];
824
+ truncated: boolean;
825
+ }>;
826
+ private planWrite;
827
+ plan(op: WriteOperation): Promise<Plan$7>;
828
+ private receipt;
829
+ }
830
+
831
+ type Plan$6 = Omit<WritePreview, 'serverValidated'> & {
832
+ execute(): Promise<string[]>;
833
+ resultDetails?(): unknown;
834
+ resultWarnings?(): string[];
835
+ };
836
+ declare const qualityInput: z.ZodObject<{
837
+ account_id: z.ZodString;
838
+ lookback_period: z.ZodEnum<{
839
+ "1d": "1d";
840
+ "14d": "14d";
841
+ }>;
842
+ source_platform: z.ZodOptional<z.ZodEnum<{
843
+ WEB: "WEB";
844
+ MOBILE: "MOBILE";
845
+ MOBILE_ANDROID: "MOBILE_ANDROID";
846
+ MOBILE_IOS: "MOBILE_IOS";
847
+ OFFLINE: "OFFLINE";
848
+ PINTEREST_WEB: "PINTEREST_WEB";
849
+ PINTEREST_ANDROID: "PINTEREST_ANDROID";
850
+ PINTEREST_IOS: "PINTEREST_IOS";
851
+ POINT_OF_SALE: "POINT_OF_SALE";
852
+ }>>;
853
+ ingestion_source: z.ZodOptional<z.ZodEnum<{
854
+ TAG: "TAG";
855
+ MMP: "MMP";
856
+ FILE_UPLOAD: "FILE_UPLOAD";
857
+ CONVERSIONS_API: "CONVERSIONS_API";
858
+ NATIVE: "NATIVE";
859
+ }>>;
860
+ }, z.core.$strict>;
861
+ /** Native wire contracts: Pinterest-owned v5 OpenAPI5.28.0 and Conversions API guide, checked2026-11-04. */
862
+ declare class PinterestMeasurementService {
863
+ private readonly client;
864
+ constructor(client: PinterestAdsClient);
865
+ supports(tool: string): boolean;
866
+ private base;
867
+ private owned;
868
+ tags(account: string, filterDeleted?: boolean): Promise<{
869
+ account_id: string;
870
+ truncated: boolean;
871
+ items: {
872
+ [x: string]: unknown;
873
+ ad_account_id: string;
874
+ name: string;
875
+ id?: string | undefined;
876
+ status?: string | undefined;
877
+ configs?: Record<string, unknown> | undefined;
878
+ last_fired_time_ms?: number | null | undefined;
879
+ }[];
880
+ }>;
881
+ context(account: string): Promise<{
882
+ account_id: string;
883
+ advertiser: {
884
+ [x: string]: unknown;
885
+ id: string;
886
+ name?: string | undefined;
887
+ currency?: string | undefined;
888
+ };
889
+ tags: {
890
+ [x: string]: unknown;
891
+ ad_account_id: string;
892
+ name: string;
893
+ id?: string | undefined;
894
+ status?: string | undefined;
895
+ configs?: Record<string, unknown> | undefined;
896
+ last_fired_time_ms?: number | null | undefined;
897
+ }[];
898
+ snapshot_hash: string;
899
+ notes: string[];
900
+ }>;
901
+ getTag(account: string, tagId: string): Promise<{
902
+ [x: string]: unknown;
903
+ ad_account_id: string;
904
+ name: string;
905
+ id?: string | undefined;
906
+ status?: string | undefined;
907
+ configs?: Record<string, unknown> | undefined;
908
+ last_fired_time_ms?: number | null | undefined;
909
+ }>;
910
+ eligible(account: string): Promise<{
911
+ account_id: string;
912
+ events: {
913
+ [x: string]: unknown;
914
+ ad_account_id?: string | undefined;
915
+ conversion_tag_id?: string | undefined;
916
+ conversion_event?: string | undefined;
917
+ created_time?: number | undefined;
918
+ reporting_conversion_event?: string | undefined;
919
+ }[];
920
+ }>;
921
+ visits(input: {
922
+ account_id: string;
923
+ page_size: number;
924
+ bookmark?: string;
925
+ order: 'ASCENDING' | 'DESCENDING';
926
+ }): Promise<{
927
+ next_cursor?: string | undefined;
928
+ account_id: string;
929
+ truncated: boolean;
930
+ items: {
931
+ [x: string]: unknown;
932
+ ad_account_id?: string | undefined;
933
+ conversion_tag_id?: string | undefined;
934
+ conversion_event?: string | undefined;
935
+ created_time?: number | undefined;
936
+ reporting_conversion_event?: string | undefined;
937
+ }[];
938
+ bookmark?: string | null | undefined;
939
+ }>;
940
+ quality(input: z.infer<typeof qualityInput>): Promise<{
941
+ account_id: string;
942
+ items: {
943
+ [x: string]: unknown;
944
+ overall_status: "NEEDS_IMPROVEMENT" | "FAIR" | "GOOD";
945
+ quality_components: Record<string, Record<string, {
946
+ [x: string]: unknown;
947
+ coverage: number;
948
+ overlap?: number | undefined;
949
+ issues?: {
950
+ [x: string]: unknown;
951
+ id: string;
952
+ name: string;
953
+ reason: string;
954
+ }[] | undefined;
955
+ }>>;
956
+ ingestion_source: "TAG" | "MMP" | "FILE_UPLOAD" | "CONVERSIONS_API" | "NATIVE";
957
+ source_platform: "WEB" | "MOBILE" | "MOBILE_ANDROID" | "MOBILE_IOS" | "OFFLINE" | "PINTEREST_WEB" | "PINTEREST_ANDROID" | "PINTEREST_IOS" | "POINT_OF_SALE";
958
+ lookback_period: "1d" | "14d";
959
+ }[];
960
+ }>;
961
+ plan(op: WriteOperation): Promise<Plan$6>;
962
+ private checkContext;
963
+ }
964
+
965
+ type Plan$5 = Omit<WritePreview, 'serverValidated'> & {
966
+ execute(): Promise<string[]>;
967
+ resultDetails?(): unknown;
968
+ resultWarnings?(): string[];
969
+ };
970
+ /** Pinterest-owned OpenAPI 5.28.0, commit 2503147; contracts fetched 2026-11-05. */
971
+ declare class PinterestCatalogService {
972
+ private readonly client;
973
+ constructor(client: PinterestAdsClient);
974
+ supports(tool: string): boolean;
975
+ private params;
976
+ private context;
977
+ private page;
978
+ private find;
979
+ private ownedCatalog;
980
+ private validateFeed;
981
+ private ownedFeed;
982
+ catalogs(input: {
983
+ account_id: string;
984
+ page_size: number;
985
+ bookmark?: string;
986
+ }): Promise<{
987
+ records: {
988
+ snapshot_hash: string;
989
+ id: string;
990
+ name: string;
991
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
992
+ created_at: string;
993
+ updated_at: string;
994
+ }[];
995
+ next_cursor?: string | undefined;
996
+ truncated: boolean;
997
+ items: {
998
+ [x: string]: unknown;
999
+ id: string;
1000
+ name: string;
1001
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1002
+ created_at: string;
1003
+ updated_at: string;
1004
+ }[];
1005
+ bookmark?: string | null | undefined;
1006
+ account_id: string;
1007
+ context_hash: string;
1008
+ }>;
1009
+ getCatalog(account: string, catalogId: string): Promise<{
1010
+ catalog: {
1011
+ [x: string]: unknown;
1012
+ id: string;
1013
+ name: string;
1014
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1015
+ created_at: string;
1016
+ updated_at: string;
1017
+ };
1018
+ records: {
1019
+ [x: string]: unknown;
1020
+ id: string;
1021
+ name: string;
1022
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1023
+ created_at: string;
1024
+ updated_at: string;
1025
+ }[];
1026
+ truncated: boolean;
1027
+ account_id: string;
1028
+ context_hash: string;
1029
+ }>;
1030
+ feeds(input: {
1031
+ account_id: string;
1032
+ catalog_id: string;
1033
+ page_size: number;
1034
+ bookmark?: string;
1035
+ }): Promise<{
1036
+ items: {
1037
+ source_origin: string;
1038
+ source_fingerprint: string;
1039
+ credentials_configured: boolean;
1040
+ snapshot_hash: string;
1041
+ }[];
1042
+ records: {
1043
+ source_origin: string;
1044
+ source_fingerprint: string;
1045
+ credentials_configured: boolean;
1046
+ snapshot_hash: string;
1047
+ }[];
1048
+ catalog_id: string;
1049
+ next_cursor?: string | undefined;
1050
+ truncated: boolean;
1051
+ bookmark?: string | null | undefined;
1052
+ account_id: string;
1053
+ context_hash: string;
1054
+ }>;
1055
+ getFeed(account: string, catalogId: string, feedId: string): Promise<{
1056
+ feed: {
1057
+ source_origin: string;
1058
+ source_fingerprint: string;
1059
+ credentials_configured: boolean;
1060
+ snapshot_hash: string;
1061
+ };
1062
+ records: {
1063
+ source_origin: string;
1064
+ source_fingerprint: string;
1065
+ credentials_configured: boolean;
1066
+ snapshot_hash: string;
1067
+ }[];
1068
+ truncated: boolean;
1069
+ account_id: string;
1070
+ context_hash: string;
1071
+ }>;
1072
+ results(input: {
1073
+ account_id: string;
1074
+ catalog_id: string;
1075
+ feed_id: string;
1076
+ page_size: number;
1077
+ bookmark?: string;
1078
+ }): Promise<{
1079
+ items: Record<string, unknown>[];
1080
+ records: Record<string, unknown>[];
1081
+ feed_id: string;
1082
+ next_cursor?: string | undefined;
1083
+ truncated: boolean;
1084
+ bookmark?: string | null | undefined;
1085
+ account_id: string;
1086
+ context_hash: string;
1087
+ }>;
1088
+ issues(input: {
1089
+ account_id: string;
1090
+ catalog_id: string;
1091
+ feed_id: string;
1092
+ processing_result_id: string;
1093
+ page_size: number;
1094
+ bookmark?: string;
1095
+ item_numbers?: number[];
1096
+ item_validation_issue?: string;
1097
+ }): Promise<{
1098
+ items: Record<string, unknown>[];
1099
+ records: Record<string, unknown>[];
1100
+ feed_id: string;
1101
+ processing_result_id: string;
1102
+ notes: string[];
1103
+ next_cursor?: string | undefined;
1104
+ truncated: boolean;
1105
+ bookmark?: string | null | undefined;
1106
+ account_id: string;
1107
+ context_hash: string;
1108
+ }>;
1109
+ private safe;
1110
+ private verify;
1111
+ plan(op: WriteOperation): Promise<Plan$5>;
1112
+ private matches;
1113
+ }
1114
+
1115
+ type Row$1 = Record<string, unknown>;
1116
+ type Plan$4 = Omit<WritePreview, 'serverValidated'> & {
1117
+ execute(): Promise<string[]>;
1118
+ resultDetails?(): unknown;
1119
+ resultWarnings?(): string[];
1120
+ };
1121
+ /** Pinterest-owned OpenAPI 5.28.0 at 51aca009, fetched 2026-11-06. */
1122
+ declare class PinterestProductGroups {
1123
+ private readonly client;
1124
+ private readonly catalogs;
1125
+ constructor(client: PinterestAdsClient, catalogs: PinterestCatalogService);
1126
+ private params;
1127
+ private scope;
1128
+ private snapshot;
1129
+ private read;
1130
+ private page;
1131
+ list(value: unknown): Promise<{
1132
+ items: {
1133
+ snapshot_hash: string;
1134
+ id: string;
1135
+ catalog_id: string;
1136
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1137
+ filters: Record<string, z.core.util.JSONType>;
1138
+ name?: string | undefined;
1139
+ description?: string | null | undefined;
1140
+ feed_id?: string | null | undefined;
1141
+ type?: string | undefined;
1142
+ country?: string | null | undefined;
1143
+ locale?: string | null | undefined;
1144
+ created_at?: number | undefined;
1145
+ updated_at?: number | undefined;
1146
+ }[];
1147
+ records: {
1148
+ snapshot_hash: string;
1149
+ id: string;
1150
+ catalog_id: string;
1151
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1152
+ filters: Record<string, z.core.util.JSONType>;
1153
+ name?: string | undefined;
1154
+ description?: string | null | undefined;
1155
+ feed_id?: string | null | undefined;
1156
+ type?: string | undefined;
1157
+ country?: string | null | undefined;
1158
+ locale?: string | null | undefined;
1159
+ created_at?: number | undefined;
1160
+ updated_at?: number | undefined;
1161
+ }[];
1162
+ notes: string[];
1163
+ next_cursor?: string | undefined;
1164
+ complete: boolean | null;
1165
+ truncated: boolean;
1166
+ }>;
1167
+ get(value: unknown): Promise<{
1168
+ group: {
1169
+ snapshot_hash: string;
1170
+ id: string;
1171
+ catalog_id: string;
1172
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1173
+ filters: Record<string, z.core.util.JSONType>;
1174
+ name?: string | undefined;
1175
+ description?: string | null | undefined;
1176
+ feed_id?: string | null | undefined;
1177
+ type?: string | undefined;
1178
+ country?: string | null | undefined;
1179
+ locale?: string | null | undefined;
1180
+ created_at?: number | undefined;
1181
+ updated_at?: number | undefined;
1182
+ };
1183
+ records: {
1184
+ snapshot_hash: string;
1185
+ id: string;
1186
+ catalog_id: string;
1187
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1188
+ filters: Record<string, z.core.util.JSONType>;
1189
+ name?: string | undefined;
1190
+ description?: string | null | undefined;
1191
+ feed_id?: string | null | undefined;
1192
+ type?: string | undefined;
1193
+ country?: string | null | undefined;
1194
+ locale?: string | null | undefined;
1195
+ created_at?: number | undefined;
1196
+ updated_at?: number | undefined;
1197
+ }[];
1198
+ notes: string[];
1199
+ }>;
1200
+ counts(value: unknown): Promise<{
1201
+ counts: {
1202
+ catalog_type: "RETAIL";
1203
+ in_stock: number;
1204
+ out_of_stock: number;
1205
+ preorder: number;
1206
+ total: number;
1207
+ videos?: number | undefined;
1208
+ } | {
1209
+ catalog_type: "HOTEL";
1210
+ total: number;
1211
+ } | {
1212
+ catalog_type: "CREATIVE_ASSETS";
1213
+ total: number;
1214
+ videos: number;
1215
+ images: number;
1216
+ app_links: number;
1217
+ };
1218
+ group_snapshot_hash: string;
1219
+ records: ({
1220
+ catalog_type: "RETAIL";
1221
+ in_stock: number;
1222
+ out_of_stock: number;
1223
+ preorder: number;
1224
+ total: number;
1225
+ videos?: number | undefined;
1226
+ id: string;
1227
+ name: string;
1228
+ } | {
1229
+ catalog_type: "HOTEL";
1230
+ total: number;
1231
+ id: string;
1232
+ name: string;
1233
+ } | {
1234
+ catalog_type: "CREATIVE_ASSETS";
1235
+ total: number;
1236
+ videos: number;
1237
+ images: number;
1238
+ app_links: number;
1239
+ id: string;
1240
+ name: string;
1241
+ })[];
1242
+ notes: string[];
1243
+ }>;
1244
+ products(value: unknown): Promise<{
1245
+ records: {
1246
+ id: string;
1247
+ name: string;
1248
+ source_id: string;
1249
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1250
+ metadata: Record<string, z.core.util.JSONType>;
1251
+ pin: Record<string, z.core.util.JSONType>;
1252
+ }[];
1253
+ group_snapshot_hash: string;
1254
+ notes: string[];
1255
+ next_cursor?: string | undefined;
1256
+ items: {
1257
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1258
+ metadata: Record<string, z.core.util.JSONType>;
1259
+ pin: Record<string, z.core.util.JSONType>;
1260
+ }[];
1261
+ complete: boolean | null;
1262
+ truncated: boolean;
1263
+ }>;
1264
+ private mutable;
1265
+ private references;
1266
+ context(value: unknown): Promise<{
1267
+ context_hash: string;
1268
+ catalog: {
1269
+ [x: string]: unknown;
1270
+ id: string;
1271
+ name: string;
1272
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1273
+ created_at: string;
1274
+ updated_at: string;
1275
+ };
1276
+ current: {
1277
+ [x: string]: unknown;
1278
+ id: string;
1279
+ catalog_id: string;
1280
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1281
+ filters: Record<string, z.core.util.JSONType>;
1282
+ name?: string | undefined;
1283
+ description?: string | null | undefined;
1284
+ feed_id?: string | null | undefined;
1285
+ type?: string | undefined;
1286
+ country?: string | null | undefined;
1287
+ locale?: string | null | undefined;
1288
+ created_at?: number | undefined;
1289
+ updated_at?: number | undefined;
1290
+ } | undefined;
1291
+ body: Row$1;
1292
+ records: ({
1293
+ id: string;
1294
+ name: string;
1295
+ reference: boolean;
1296
+ snapshot_hash: string;
1297
+ } | {
1298
+ snapshot_hash: string;
1299
+ id: string;
1300
+ catalog_id: string;
1301
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1302
+ filters: Record<string, z.core.util.JSONType>;
1303
+ name?: string | undefined;
1304
+ description?: string | null | undefined;
1305
+ feed_id?: string | null | undefined;
1306
+ type?: string | undefined;
1307
+ country?: string | null | undefined;
1308
+ locale?: string | null | undefined;
1309
+ created_at?: number | undefined;
1310
+ updated_at?: number | undefined;
1311
+ } | {
1312
+ id: string;
1313
+ name: string;
1314
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1315
+ })[];
1316
+ reference_count: number;
1317
+ notes: string[];
1318
+ }>;
1319
+ plan(op: WriteOperation): Promise<Plan$4>;
1320
+ }
1321
+
1322
+ type Row = Record<string, unknown>;
1323
+ type Current$1 = {
1324
+ id: string;
1325
+ state: 'PRESENT' | 'NATIVE_ITEM_ERROR' | 'NOT_RETURNED';
1326
+ attributes?: Row;
1327
+ pins?: unknown[] | null;
1328
+ diagnostics: unknown;
1329
+ diagnostic_hash?: string;
1330
+ };
1331
+ type Plan$3 = Omit<WritePreview, 'serverValidated'> & {
1332
+ execute(): Promise<string[]>;
1333
+ resultDetails?(): unknown;
1334
+ resultWarnings?(): string[];
1335
+ };
1336
+ /** Native vertical item batches, Pinterest OpenAPI 5.28.0 at 51aca009. */
1337
+ declare class PinterestCatalogItems {
1338
+ private readonly client;
1339
+ private readonly catalogs;
1340
+ private readonly media;
1341
+ constructor(client: PinterestAdsClient, catalogs: PinterestCatalogService, media: MediaResolver);
1342
+ supports(tool: string): boolean;
1343
+ private scopeId;
1344
+ private params;
1345
+ private snapshot;
1346
+ private selected;
1347
+ private readSet;
1348
+ private previewMedia;
1349
+ list(value: unknown): Promise<{
1350
+ notes: string[];
1351
+ next_cursor?: string | undefined;
1352
+ records: {
1353
+ id: string;
1354
+ name: string;
1355
+ status: "PRESENT" | "NATIVE_ITEM_ERROR" | "NOT_RETURNED";
1356
+ attributes: unknown;
1357
+ diagnostics: unknown;
1358
+ snapshot_hash: string;
1359
+ }[];
1360
+ creatives: {
1361
+ id: string;
1362
+ provider: string;
1363
+ account_id: string;
1364
+ name: string;
1365
+ type: string;
1366
+ headlines: string[];
1367
+ descriptions: string[];
1368
+ landing_urls: string[];
1369
+ media: {
1370
+ type: "image" | "video" | "audio";
1371
+ url: string;
1372
+ alt?: string | undefined;
1373
+ poster_url?: string | undefined;
1374
+ open_url?: string | undefined;
1375
+ }[];
1376
+ actions: {
1377
+ label: string;
1378
+ tool: string;
1379
+ arguments: Record<string, unknown>;
1380
+ fields: {
1381
+ key: string;
1382
+ label: string;
1383
+ type: "text" | "text_list" | "url_list" | "select";
1384
+ value: string | string[];
1385
+ options?: {
1386
+ label: string;
1387
+ value: string;
1388
+ }[] | undefined;
1389
+ max_length?: number | undefined;
1390
+ }[];
1391
+ }[];
1392
+ status?: string | undefined;
1393
+ campaign_id?: string | undefined;
1394
+ ad_group_id?: string | undefined;
1395
+ }[];
1396
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1397
+ truncated: boolean;
1398
+ }>;
1399
+ private materialize;
1400
+ private manifest;
1401
+ context(value: unknown): Promise<{
1402
+ context_hash: string;
1403
+ scope_id: string;
1404
+ selection: {
1405
+ account_id: string;
1406
+ catalog_id: string;
1407
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1408
+ language: "TE" | "CA" | "AM" | "AR" | "AZ" | "BG" | "BN" | "BS" | "DE" | "DZ" | "ES" | "ET" | "FI" | "FR" | "HR" | "HU" | "ID" | "IN" | "IS" | "IT" | "KM" | "LT" | "LV" | "MK" | "MN" | "MS" | "MY" | "NE" | "NL" | "NO" | "PL" | "PT" | "RO" | "RU" | "SK" | "SL" | "SR" | "SV" | "TH" | "TL" | "TR" | "VI" | "af-ZA" | "ar-SA" | "bg-BG" | "bn-IN" | "cs-CZ" | "da-DK" | "de" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-US" | "es-419" | "es-AR" | "es-ES" | "es-MX" | "fi-FI" | "fr" | "fr-CA" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "id-ID" | "it" | "ja" | "ko-KR" | "ms-MY" | "nb-NO" | "nl" | "pl-PL" | "pt-BR" | "pt-PT" | "ro-RO" | "ru-RU" | "sk-SK" | "sv-SE" | "te-IN" | "th-TH" | "tl-PH" | "tr" | "uk-UA" | "vi-VN" | "zh-CN" | "zh-TW" | "CS" | "DA" | "DV" | "EL" | "EN" | "FA" | "HE" | "HI" | "HY" | "IW" | "JA" | "KA" | "KO" | "LO" | "NB" | "SQ" | "UK" | "XX" | "ZH";
1409
+ };
1410
+ request: {
1411
+ operations: {
1412
+ source_id: string;
1413
+ operation: "DELETE" | "UPDATE" | "CREATE" | "UPSERT";
1414
+ attributes?: Record<string, z.core.util.JSONType> | undefined;
1415
+ clear_fields?: ("link" | "pattern" | "title" | "description" | "brand" | "ad_link" | "adult" | "age_group" | "availability" | "average_review_rating" | "checkout_enabled" | "color" | "condition" | "custom_label_0" | "custom_label_1" | "custom_label_2" | "custom_label_3" | "custom_label_4" | "custom_number_0" | "custom_number_1" | "custom_number_2" | "custom_number_3" | "custom_number_4" | "free_shipping_label" | "free_shipping_limit" | "gender" | "google_product_category" | "gtin" | "item_group_id" | "last_updated_time" | "material" | "min_ad_price" | "mpn" | "number_of_ratings" | "number_of_reviews" | "price" | "product_type" | "promotion_id" | "sale_price" | "shipping" | "shipping_height" | "shipping_weight" | "shipping_width" | "size" | "size_system" | "size_type" | "tax" | "variant_names" | "variant_values")[] | undefined;
1416
+ last_updated_time?: number | undefined;
1417
+ }[];
1418
+ media_assets: {
1419
+ item_index: number;
1420
+ field: string;
1421
+ media_id: string;
1422
+ expected_sha256: string;
1423
+ image_index?: number | undefined;
1424
+ }[];
1425
+ acknowledge_replacement?: true | undefined;
1426
+ acknowledge_unconfirmed_existing?: true | undefined;
1427
+ };
1428
+ catalog: {
1429
+ [x: string]: unknown;
1430
+ id: string;
1431
+ name: string;
1432
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1433
+ created_at: string;
1434
+ updated_at: string;
1435
+ };
1436
+ owner: string;
1437
+ current: Current$1[];
1438
+ prepared: {
1439
+ rows: {
1440
+ source_id: string;
1441
+ operation: "DELETE" | "UPDATE" | "CREATE" | "UPSERT";
1442
+ attributes?: Record<string, z.core.util.JSONType> | undefined;
1443
+ clear_fields?: ("link" | "pattern" | "title" | "description" | "brand" | "ad_link" | "adult" | "age_group" | "availability" | "average_review_rating" | "checkout_enabled" | "color" | "condition" | "custom_label_0" | "custom_label_1" | "custom_label_2" | "custom_label_3" | "custom_label_4" | "custom_number_0" | "custom_number_1" | "custom_number_2" | "custom_number_3" | "custom_number_4" | "free_shipping_label" | "free_shipping_limit" | "gender" | "google_product_category" | "gtin" | "item_group_id" | "last_updated_time" | "material" | "min_ad_price" | "mpn" | "number_of_ratings" | "number_of_reviews" | "price" | "product_type" | "promotion_id" | "sale_price" | "shipping" | "shipping_height" | "shipping_weight" | "shipping_width" | "size" | "size_system" | "size_type" | "tax" | "variant_names" | "variant_values")[] | undefined;
1444
+ last_updated_time?: number | undefined;
1445
+ }[];
1446
+ sources: Row[];
1447
+ expires: string | undefined;
1448
+ };
1449
+ records: {
1450
+ id: string;
1451
+ name: string;
1452
+ status: "PRESENT" | "NATIVE_ITEM_ERROR" | "NOT_RETURNED";
1453
+ snapshot_hash: string;
1454
+ diagnostics: unknown;
1455
+ }[];
1456
+ notes: string[];
1457
+ }>;
1458
+ publicContext(value: unknown): Promise<{
1459
+ context_hash: string;
1460
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1461
+ records: {
1462
+ id: string;
1463
+ name: string;
1464
+ status: "PRESENT" | "NATIVE_ITEM_ERROR" | "NOT_RETURNED";
1465
+ snapshot_hash: string;
1466
+ diagnostics: unknown;
1467
+ }[];
1468
+ media: Row[];
1469
+ changes: {
1470
+ source_id: string;
1471
+ operation: "DELETE" | "UPDATE" | "CREATE" | "UPSERT";
1472
+ attributes: unknown;
1473
+ clear_fields: ("link" | "pattern" | "title" | "description" | "brand" | "ad_link" | "adult" | "age_group" | "availability" | "average_review_rating" | "checkout_enabled" | "color" | "condition" | "custom_label_0" | "custom_label_1" | "custom_label_2" | "custom_label_3" | "custom_label_4" | "custom_number_0" | "custom_number_1" | "custom_number_2" | "custom_number_3" | "custom_number_4" | "free_shipping_label" | "free_shipping_limit" | "gender" | "google_product_category" | "gtin" | "item_group_id" | "last_updated_time" | "material" | "min_ad_price" | "mpn" | "number_of_ratings" | "number_of_reviews" | "price" | "product_type" | "promotion_id" | "sale_price" | "shipping" | "shipping_height" | "shipping_weight" | "shipping_width" | "size" | "size_system" | "size_type" | "tax" | "variant_names" | "variant_values")[] | undefined;
1474
+ }[];
1475
+ notes: string[];
1476
+ }>;
1477
+ private batchRows;
1478
+ private verifiedReceipt;
1479
+ status(value: unknown, reconcile?: boolean): Promise<{
1480
+ media_expires_at: string | undefined;
1481
+ notes: string[];
1482
+ readback_error?: Row | undefined;
1483
+ batch_id: string;
1484
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1485
+ status: string;
1486
+ records: Row[];
1487
+ submitted_items: number;
1488
+ terminal_items: number;
1489
+ all_items_native_successful: boolean;
1490
+ }>;
1491
+ plan(op: WriteOperation): Promise<Plan$3>;
1492
+ }
1493
+
1494
+ type LocalRow = Record<string, unknown>;
1495
+ declare const localScope: z.ZodObject<{
1496
+ account_id: z.ZodString;
1497
+ catalog_id: z.ZodString;
1498
+ }, z.core.$strict>;
1499
+ type LocalScope = z.infer<typeof localScope>;
1500
+ declare const inventoryPair: z.ZodObject<{
1501
+ item_id: z.ZodString;
1502
+ store_code: z.ZodString;
1503
+ store_id: z.ZodString;
1504
+ }, z.core.$strict>;
1505
+
1506
+ type Plan$2 = Omit<WritePreview, 'serverValidated'> & {
1507
+ execute(): Promise<string[]>;
1508
+ resultDetails?(): unknown;
1509
+ resultWarnings?(): string[];
1510
+ };
1511
+ declare class PinterestLocalStores {
1512
+ private readonly client;
1513
+ private readonly catalogs;
1514
+ constructor(client: PinterestAdsClient, catalogs: PinterestCatalogService);
1515
+ supports(tool: string): boolean;
1516
+ params(account: string, extra?: Record<string, string>): node_url.URLSearchParams;
1517
+ path(catalog: string): string;
1518
+ selected(value: LocalScope): Promise<{
1519
+ selection: {
1520
+ account_id: string;
1521
+ catalog_id: string;
1522
+ };
1523
+ catalog: {
1524
+ [x: string]: unknown;
1525
+ id: string;
1526
+ name: string;
1527
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1528
+ created_at: string;
1529
+ updated_at: string;
1530
+ };
1531
+ owner: string;
1532
+ }>;
1533
+ private page;
1534
+ list(value: unknown): Promise<{
1535
+ notes: string[];
1536
+ next_cursor?: string | undefined;
1537
+ records: {
1538
+ snapshot_hash: string;
1539
+ store_code: string;
1540
+ name: string;
1541
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1542
+ id: string;
1543
+ created_at: string;
1544
+ updated_at: string;
1545
+ address_primary?: string | undefined;
1546
+ address_secondary?: string | undefined;
1547
+ city?: string | undefined;
1548
+ region?: string | undefined;
1549
+ postal_code?: string | undefined;
1550
+ latitude?: number | undefined;
1551
+ longitude?: number | undefined;
1552
+ }[];
1553
+ complete: boolean | null;
1554
+ truncated: boolean;
1555
+ }>;
1556
+ private gather;
1557
+ owned(selection: LocalScope, ids: string[]): Promise<{
1558
+ [x: string]: unknown;
1559
+ store_code: string;
1560
+ name: string;
1561
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1562
+ id: string;
1563
+ created_at: string;
1564
+ updated_at: string;
1565
+ address_primary?: string | undefined;
1566
+ address_secondary?: string | undefined;
1567
+ city?: string | undefined;
1568
+ region?: string | undefined;
1569
+ postal_code?: string | undefined;
1570
+ latitude?: number | undefined;
1571
+ longitude?: number | undefined;
1572
+ }[]>;
1573
+ context(value: unknown): Promise<{
1574
+ action: {
1575
+ kind: "create";
1576
+ stores: {
1577
+ store_code: string;
1578
+ name: string;
1579
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1580
+ address_primary?: string | undefined;
1581
+ address_secondary?: string | undefined;
1582
+ city?: string | undefined;
1583
+ region?: string | undefined;
1584
+ postal_code?: string | undefined;
1585
+ latitude?: number | undefined;
1586
+ longitude?: number | undefined;
1587
+ }[];
1588
+ } | {
1589
+ kind: "update";
1590
+ stores: {
1591
+ id: string;
1592
+ store_code?: string | undefined;
1593
+ name?: string | undefined;
1594
+ country?: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | undefined;
1595
+ address_primary?: string | undefined;
1596
+ address_secondary?: string | undefined;
1597
+ city?: string | undefined;
1598
+ region?: string | undefined;
1599
+ postal_code?: string | undefined;
1600
+ latitude?: number | undefined;
1601
+ longitude?: number | undefined;
1602
+ }[];
1603
+ acknowledge_store_code_change?: true | undefined;
1604
+ } | {
1605
+ kind: "delete";
1606
+ stores: {
1607
+ id: string;
1608
+ confirm_store_code: string;
1609
+ confirm_name: string;
1610
+ }[];
1611
+ };
1612
+ current: {
1613
+ [x: string]: unknown;
1614
+ store_code: string;
1615
+ name: string;
1616
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1617
+ id: string;
1618
+ created_at: string;
1619
+ updated_at: string;
1620
+ address_primary?: string | undefined;
1621
+ address_secondary?: string | undefined;
1622
+ city?: string | undefined;
1623
+ region?: string | undefined;
1624
+ postal_code?: string | undefined;
1625
+ latitude?: number | undefined;
1626
+ longitude?: number | undefined;
1627
+ }[];
1628
+ occupied_ids: string[];
1629
+ context_hash: string;
1630
+ records: {
1631
+ snapshot_hash: string;
1632
+ store_code: string;
1633
+ name: string;
1634
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1635
+ id: string;
1636
+ created_at: string;
1637
+ updated_at: string;
1638
+ address_primary?: string | undefined;
1639
+ address_secondary?: string | undefined;
1640
+ city?: string | undefined;
1641
+ region?: string | undefined;
1642
+ postal_code?: string | undefined;
1643
+ latitude?: number | undefined;
1644
+ longitude?: number | undefined;
1645
+ }[];
1646
+ notes: string[];
1647
+ selection: {
1648
+ account_id: string;
1649
+ catalog_id: string;
1650
+ };
1651
+ catalog: {
1652
+ [x: string]: unknown;
1653
+ id: string;
1654
+ name: string;
1655
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1656
+ created_at: string;
1657
+ updated_at: string;
1658
+ };
1659
+ owner: string;
1660
+ }>;
1661
+ publicContext(value: unknown): Promise<{
1662
+ context_hash: string;
1663
+ records: {
1664
+ snapshot_hash: string;
1665
+ store_code: string;
1666
+ name: string;
1667
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1668
+ id: string;
1669
+ created_at: string;
1670
+ updated_at: string;
1671
+ address_primary?: string | undefined;
1672
+ address_secondary?: string | undefined;
1673
+ city?: string | undefined;
1674
+ region?: string | undefined;
1675
+ postal_code?: string | undefined;
1676
+ latitude?: number | undefined;
1677
+ longitude?: number | undefined;
1678
+ }[];
1679
+ action: {
1680
+ kind: "create";
1681
+ stores: {
1682
+ store_code: string;
1683
+ name: string;
1684
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1685
+ address_primary?: string | undefined;
1686
+ address_secondary?: string | undefined;
1687
+ city?: string | undefined;
1688
+ region?: string | undefined;
1689
+ postal_code?: string | undefined;
1690
+ latitude?: number | undefined;
1691
+ longitude?: number | undefined;
1692
+ }[];
1693
+ } | {
1694
+ kind: "update";
1695
+ stores: {
1696
+ id: string;
1697
+ store_code?: string | undefined;
1698
+ name?: string | undefined;
1699
+ country?: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | undefined;
1700
+ address_primary?: string | undefined;
1701
+ address_secondary?: string | undefined;
1702
+ city?: string | undefined;
1703
+ region?: string | undefined;
1704
+ postal_code?: string | undefined;
1705
+ latitude?: number | undefined;
1706
+ longitude?: number | undefined;
1707
+ }[];
1708
+ acknowledge_store_code_change?: true | undefined;
1709
+ } | {
1710
+ kind: "delete";
1711
+ stores: {
1712
+ id: string;
1713
+ confirm_store_code: string;
1714
+ confirm_name: string;
1715
+ }[];
1716
+ };
1717
+ notes: string[];
1718
+ }>;
1719
+ plan(op: WriteOperation): Promise<Plan$2>;
1720
+ }
1721
+
1722
+ type Pair = z.infer<typeof inventoryPair>;
1723
+ type Current = {
1724
+ pair: Pair;
1725
+ state: 'PRESENT' | 'NOT_RETURNED';
1726
+ attributes?: LocalRow;
1727
+ metadata?: LocalRow;
1728
+ };
1729
+ type Plan$1 = Omit<WritePreview, 'serverValidated'> & {
1730
+ execute(): Promise<string[]>;
1731
+ resultDetails?(): unknown;
1732
+ resultWarnings?(): string[];
1733
+ };
1734
+ declare class PinterestLocalInventory {
1735
+ private readonly client;
1736
+ private readonly stores;
1737
+ private readonly media;
1738
+ constructor(client: PinterestAdsClient, stores: PinterestLocalStores, media: MediaResolver);
1739
+ supports(tool: string): boolean;
1740
+ private scopeId;
1741
+ private path;
1742
+ private selected;
1743
+ private readSet;
1744
+ private record;
1745
+ list(value: unknown): Promise<{
1746
+ notes: string[];
1747
+ next_cursor?: string | undefined;
1748
+ records: {
1749
+ status: "PRESENT" | "NOT_RETURNED";
1750
+ attributes: unknown;
1751
+ store_metadata: LocalRow | undefined;
1752
+ item_id: string;
1753
+ store_code: string;
1754
+ store_id: string;
1755
+ id: string;
1756
+ name: string;
1757
+ }[];
1758
+ truncated: boolean;
1759
+ }>;
1760
+ private manifest;
1761
+ context(value: unknown): Promise<{
1762
+ request: {
1763
+ operations: ({
1764
+ item_id: string;
1765
+ store_code: string;
1766
+ store_id: string;
1767
+ operation: "CREATE";
1768
+ attributes: {
1769
+ price: string;
1770
+ availability: "preorder" | "in stock" | "out of stock";
1771
+ sale_price?: string | undefined;
1772
+ ad_link?: string | undefined;
1773
+ };
1774
+ } | {
1775
+ item_id: string;
1776
+ store_code: string;
1777
+ store_id: string;
1778
+ operation: "UPSERT";
1779
+ attributes: {
1780
+ price: string;
1781
+ availability: "preorder" | "in stock" | "out of stock";
1782
+ sale_price?: string | undefined;
1783
+ ad_link?: string | undefined;
1784
+ };
1785
+ } | {
1786
+ item_id: string;
1787
+ store_code: string;
1788
+ store_id: string;
1789
+ operation: "UPDATE";
1790
+ attributes: {
1791
+ price?: string | undefined;
1792
+ availability?: "preorder" | "in stock" | "out of stock" | undefined;
1793
+ sale_price?: string | undefined;
1794
+ ad_link?: string | undefined;
1795
+ };
1796
+ } | {
1797
+ item_id: string;
1798
+ store_code: string;
1799
+ store_id: string;
1800
+ operation: "DELETE";
1801
+ })[];
1802
+ acknowledge_replacement?: true | undefined;
1803
+ acknowledge_unconfirmed_existing?: true | undefined;
1804
+ };
1805
+ current: Current[];
1806
+ manifest: {
1807
+ preserved_hash?: string | undefined;
1808
+ desired_hash?: string | undefined;
1809
+ operation: "DELETE" | "UPDATE" | "CREATE" | "UPSERT";
1810
+ desired_keys: ("ad_link" | "availability" | "price" | "sale_price")[];
1811
+ item_id: string;
1812
+ store_code: string;
1813
+ store_id: string;
1814
+ }[];
1815
+ scope_id: string;
1816
+ context_hash: string;
1817
+ records: {
1818
+ status: "PRESENT" | "NOT_RETURNED";
1819
+ attributes: unknown;
1820
+ store_metadata: LocalRow | undefined;
1821
+ item_id: string;
1822
+ store_code: string;
1823
+ store_id: string;
1824
+ id: string;
1825
+ name: string;
1826
+ }[];
1827
+ notes: string[];
1828
+ stores: {
1829
+ [x: string]: unknown;
1830
+ store_code: string;
1831
+ name: string;
1832
+ country: "CA" | "GB" | "US" | "IE" | "AU" | "NZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1833
+ id: string;
1834
+ created_at: string;
1835
+ updated_at: string;
1836
+ address_primary?: string | undefined;
1837
+ address_secondary?: string | undefined;
1838
+ city?: string | undefined;
1839
+ region?: string | undefined;
1840
+ postal_code?: string | undefined;
1841
+ latitude?: number | undefined;
1842
+ longitude?: number | undefined;
1843
+ }[];
1844
+ selection: {
1845
+ account_id: string;
1846
+ catalog_id: string;
1847
+ };
1848
+ catalog: {
1849
+ [x: string]: unknown;
1850
+ id: string;
1851
+ name: string;
1852
+ catalog_type: "RETAIL" | "HOTEL" | "CREATIVE_ASSETS";
1853
+ created_at: string;
1854
+ updated_at: string;
1855
+ };
1856
+ owner: string;
1857
+ }>;
1858
+ publicContext(value: unknown): Promise<{
1859
+ context_hash: string;
1860
+ records: {
1861
+ status: "PRESENT" | "NOT_RETURNED";
1862
+ attributes: unknown;
1863
+ store_metadata: LocalRow | undefined;
1864
+ item_id: string;
1865
+ store_code: string;
1866
+ store_id: string;
1867
+ id: string;
1868
+ name: string;
1869
+ }[];
1870
+ changes: unknown[];
1871
+ notes: string[];
1872
+ }>;
1873
+ private batchRows;
1874
+ private verifiedReceipt;
1875
+ status(value: unknown, reconcile?: boolean): Promise<{
1876
+ publication_verified: boolean;
1877
+ notes: string[];
1878
+ readback_error?: LocalRow | undefined;
1879
+ batch_id: string;
1880
+ status: "COMPLETED" | "FAILED" | "PROCESSING";
1881
+ records: LocalRow[];
1882
+ submitted_items: number;
1883
+ terminal_items: number;
1884
+ all_items_native_successful: boolean;
1885
+ }>;
1886
+ plan(op: WriteOperation): Promise<Plan$1>;
1887
+ }
1888
+
1889
+ type Campaign = z.infer<typeof campaignSchema>;
1890
+ type Plan = Omit<WritePreview, 'serverValidated'> & {
1891
+ execute(): Promise<string[]>;
1892
+ resultDetails?(): unknown;
1893
+ resultWarnings?(): string[];
1894
+ };
1895
+ /** Fixed/average semantics are explicit; the shared cap still checks native nominal micros. */
1896
+ declare class PinterestCampaignBudgets {
1897
+ private readonly client;
1898
+ private readonly campaign;
1899
+ private readonly projectScope;
1900
+ constructor(client: PinterestAdsClient, campaign: (account: string, id: string) => Promise<Campaign>, projectScope: () => string);
1901
+ supports(tool: string): tool is "pinterest_set_campaign_daily_budget";
1902
+ private account;
1903
+ private currency;
1904
+ private mode;
1905
+ context(value: unknown): Promise<{
1906
+ account: {
1907
+ id: string;
1908
+ currency: string | undefined;
1909
+ country: string | undefined;
1910
+ owner_fingerprint: string | undefined;
1911
+ };
1912
+ current: {
1913
+ [x: string]: unknown;
1914
+ id: string;
1915
+ ad_account_id: string;
1916
+ name?: string | null | undefined;
1917
+ status?: "ACTIVE" | "PAUSED" | "ARCHIVED" | "DRAFT" | "DELETED_DRAFT" | undefined;
1918
+ daily_spend_cap?: number | null | undefined;
1919
+ lifetime_spend_cap?: number | null | undefined;
1920
+ is_campaign_budget_optimization?: boolean | null | undefined;
1921
+ is_flexible_daily_budgets?: boolean | null | undefined;
1922
+ };
1923
+ mode: string;
1924
+ scope: string;
1925
+ context_hash: string;
1926
+ records: {
1927
+ id: string;
1928
+ name: string;
1929
+ status: "ACTIVE" | "PAUSED" | "ARCHIVED" | "DRAFT" | "DELETED_DRAFT" | undefined;
1930
+ budget_mode: string;
1931
+ budget_micros: number | null | undefined;
1932
+ currency: string | undefined;
1933
+ is_campaign_budget_optimization: boolean | null | undefined;
1934
+ is_flexible_daily_budgets: boolean | null | undefined;
1935
+ }[];
1936
+ notes: string[];
1937
+ }>;
1938
+ publicContext(value: unknown): Promise<{
1939
+ context_hash: string;
1940
+ records: {
1941
+ id: string;
1942
+ name: string;
1943
+ status: "ACTIVE" | "PAUSED" | "ARCHIVED" | "DRAFT" | "DELETED_DRAFT" | undefined;
1944
+ budget_mode: string;
1945
+ budget_micros: number | null | undefined;
1946
+ currency: string | undefined;
1947
+ is_campaign_budget_optimization: boolean | null | undefined;
1948
+ is_flexible_daily_budgets: boolean | null | undefined;
1949
+ }[];
1950
+ notes: string[];
1951
+ }>;
1952
+ private write;
1953
+ private preserved;
1954
+ create(input: z.infer<typeof createCampaignSchema>, op: WriteOperation, guard: WriteGuard): Promise<Plan>;
1955
+ plan(op: WriteOperation): Promise<Plan>;
1956
+ }
1957
+
34
1958
  declare class PinterestAdsProvider implements AdProvider {
35
1959
  private readonly client;
36
1960
  readonly id = "pinterest";
37
- constructor(client: PinterestAdsClient);
1961
+ readonly creatives: PinterestCreativeService;
1962
+ readonly assets: PinterestAssetService;
1963
+ readonly keywords: PinterestKeywordService;
1964
+ readonly audiences: PinterestAudienceService;
1965
+ readonly measurement: PinterestMeasurementService;
1966
+ readonly catalogs: PinterestCatalogService;
1967
+ readonly productGroups: PinterestProductGroups;
1968
+ readonly catalogItems: PinterestCatalogItems;
1969
+ readonly localStores: PinterestLocalStores;
1970
+ readonly localInventory: PinterestLocalInventory;
1971
+ readonly campaignBudgets: PinterestCampaignBudgets;
1972
+ constructor(client: PinterestAdsClient, media?: MediaResolver);
38
1973
  capabilities(): {
39
1974
  serverDryRun: boolean;
40
1975
  };
@@ -73,29 +2008,7 @@ declare class PinterestAdsProvider implements AdProvider {
73
2008
 
74
2009
  declare function pinterestTools(provider: PinterestAdsProvider): AnyToolDefinition[];
75
2010
 
76
- declare const accountSchema: z.ZodObject<{
77
- id: z.ZodString;
78
- name: z.ZodOptional<z.ZodString>;
79
- currency: z.ZodOptional<z.ZodString>;
80
- }, z.core.$loose>;
81
- declare const campaignSchema: z.ZodObject<{
82
- id: z.ZodString;
83
- ad_account_id: z.ZodString;
84
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
- status: z.ZodOptional<z.ZodEnum<{
86
- ACTIVE: "ACTIVE";
87
- PAUSED: "PAUSED";
88
- ARCHIVED: "ARCHIVED";
89
- DRAFT: "DRAFT";
90
- DELETED_DRAFT: "DELETED_DRAFT";
91
- }>>;
92
- daily_spend_cap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
93
- lifetime_spend_cap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
94
- is_campaign_budget_optimization: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
95
- is_flexible_daily_budgets: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
96
- }, z.core.$loose>;
97
-
98
2011
  declare function resolvePinterestCredentials(store: CredentialStore): Promise<PinterestCredentials | undefined>;
99
2012
  declare function createPinterestModule(store: CredentialStore): Promise<ProviderModule | undefined>;
100
2013
 
101
- export { PINTEREST_API_BASE, PINTEREST_TOKEN_URL, PinterestAdsClient, PinterestAdsProvider, type PinterestCredentials, accountSchema, buildPinterestAuthUrl, campaignSchema, createPinterestModule, exchangePinterestCode, pinterestTools, resolvePinterestCredentials };
2014
+ export { PINTEREST_ADS_SCOPES, PINTEREST_API_BASE, PINTEREST_CATALOG_SCOPES, PINTEREST_PIN_SCOPES, PINTEREST_SECRET_PIN_SCOPES, PINTEREST_TOKEN_URL, PinterestAdsClient, PinterestAdsProvider, type PinterestAuthorizationOptions, type PinterestCredentials, accountSchema, buildPinterestAuthUrl, campaignSchema, createPinterestModule, exchangePinterestCode, pinterestAuthorizationScopes, pinterestTools, resolvePinterestCredentials };