@pindownai/client-js 1.3.3 → 1.3.5

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,668 +1,5 @@
1
- /**
2
- * Pin types for the v1 Pins API.
3
- * Aligned with backend-api/src/lib/pin-types.ts + pin-config-schemas.ts.
4
- * Import per-type *PinConfig interfaces for typed CRUD payloads.
5
- */
6
- declare const PRODUCT_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "code", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "qr-code", "social-handles", "steps", "trace", "plan", "notes", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "business-card", "video", "audio", "file-upload", "kanban-board", "checklist", "comparison", "calendar", "roadmap", "realtime-canvas"];
7
- declare const ALL_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "code", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "qr-code", "social-handles", "steps", "trace", "plan", "notes", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "business-card", "video", "audio", "file-upload", "kanban-board", "checklist", "comparison", "calendar", "roadmap", "realtime-canvas"];
8
- type ProductPinTypeId = (typeof PRODUCT_PIN_TYPES)[number];
9
- type PinTypeId = (typeof ALL_PIN_TYPES)[number];
10
- type PinLayout = '1x1' | '1x2' | '2x1' | '2x2' | '3x1' | '3x2' | '3x3' | '4x4';
11
- type PinDataType = 'markdown' | 'json' | 'text' | 'pin-card';
12
- /** @deprecated Use PinTypeId */
13
- type PinCardType = PinTypeId;
14
- interface StatCardItem {
15
- title: string;
16
- value: string | number;
17
- change?: string;
18
- trend?: 'up' | 'down' | 'neutral' | string;
19
- icon?: string;
20
- [key: string]: unknown;
21
- }
22
- interface TableColumn {
23
- id: string;
24
- name: string;
25
- type?: string;
26
- [key: string]: unknown;
27
- }
28
- interface TableRow {
29
- id: string;
30
- cells: Record<string, unknown>;
31
- [key: string]: unknown;
32
- }
33
- interface KanbanColumn {
34
- id: string;
35
- title: string;
36
- cards?: Array<Record<string, unknown>>;
37
- [key: string]: unknown;
38
- }
39
- interface ChecklistItem {
40
- id: string;
41
- name: string;
42
- checked?: boolean;
43
- [key: string]: unknown;
44
- }
45
- interface GalleryImage {
46
- url: string;
47
- alt?: string;
48
- [key: string]: unknown;
49
- }
50
- interface LinkItem {
51
- title: string;
52
- url: string;
53
- [key: string]: unknown;
54
- }
55
- interface StepItem {
56
- title: string;
57
- description?: string;
58
- [key: string]: unknown;
59
- }
60
- interface MarkdownPinConfig {
61
- content?: string;
62
- collaboration?: {
63
- enabled?: boolean;
64
- };
65
- [key: string]: unknown;
66
- }
67
- interface ImagePinConfig {
68
- url?: string;
69
- altText?: string;
70
- fit?: 'cover' | 'contain' | string;
71
- [key: string]: unknown;
72
- }
73
- interface GalleryPinConfig {
74
- images?: GalleryImage[];
75
- [key: string]: unknown;
76
- }
77
- interface TablePinConfig {
78
- columns: TableColumn[];
79
- rows?: TableRow[];
80
- [key: string]: unknown;
81
- }
82
- interface ChartsPinConfig {
83
- chartType?: string;
84
- data?: Array<Record<string, unknown>>;
85
- xAxis?: string;
86
- yAxis?: string;
87
- [key: string]: unknown;
88
- }
89
- interface MermaidPinConfig {
90
- diagram?: string;
91
- code?: string;
92
- title?: string;
93
- [key: string]: unknown;
94
- }
95
- interface CodePinConfig {
96
- code: string;
97
- language?: string;
98
- filename?: string;
99
- title?: string;
100
- [key: string]: unknown;
101
- }
102
- interface EmbedPinConfig {
103
- url?: string;
104
- type?: string;
105
- [key: string]: unknown;
106
- }
107
- interface PdfViewerPinConfig {
108
- pdf: {
109
- url: string;
110
- fileName?: string;
111
- title?: string;
112
- [key: string]: unknown;
113
- };
114
- [key: string]: unknown;
115
- }
116
- interface ExcelViewerPinConfig {
117
- excel: {
118
- url: string;
119
- fileName?: string;
120
- title?: string;
121
- [key: string]: unknown;
122
- };
123
- [key: string]: unknown;
124
- }
125
- interface StatCardsPinConfig {
126
- cards: StatCardItem[];
127
- [key: string]: unknown;
128
- }
129
- interface TimelinePinConfig {
130
- mode?: string;
131
- items?: Array<Record<string, unknown>>;
132
- [key: string]: unknown;
133
- }
134
- interface JsonViewerPinConfig {
135
- json?: unknown;
136
- jsonString?: string;
137
- title?: string;
138
- [key: string]: unknown;
139
- }
140
- interface JsonListPinConfig {
141
- json?: unknown[];
142
- jsonString?: string;
143
- [key: string]: unknown;
144
- }
145
- interface LinksPinConfig {
146
- links?: LinkItem[];
147
- [key: string]: unknown;
148
- }
149
- interface QrCodePinConfig {
150
- url?: string;
151
- label?: string;
152
- [key: string]: unknown;
153
- }
154
- interface SocialHandleItem {
155
- id?: string;
156
- platform: string;
157
- url: string;
158
- label?: string;
159
- [key: string]: unknown;
160
- }
161
- interface SocialHandlesPinConfig {
162
- title?: string;
163
- showLabels?: boolean;
164
- iconSize?: number;
165
- handles?: SocialHandleItem[];
166
- [key: string]: unknown;
167
- }
168
- interface StepsPinConfig {
169
- steps: StepItem[];
170
- [key: string]: unknown;
171
- }
172
- type TraceSpanStatus = 'completed' | 'running' | 'pending' | 'failed';
173
- type TraceSpanType = 'system' | 'agent' | 'tool';
174
- interface TraceSpanItem {
175
- id?: string;
176
- type?: TraceSpanType;
177
- name: string;
178
- status: TraceSpanStatus;
179
- timestamp?: string;
180
- duration?: string;
181
- details?: string;
182
- }
183
- interface TracePinConfig {
184
- title?: string;
185
- live?: boolean;
186
- spans: TraceSpanItem[];
187
- [key: string]: unknown;
188
- }
189
- type PlanContentBlock = {
190
- type: 'details';
191
- title?: string;
192
- items: string[];
193
- } | {
194
- type: 'command';
195
- command: string;
196
- label?: string;
197
- } | {
198
- type: 'code';
199
- code: string;
200
- language?: string;
201
- filename?: string;
202
- } | {
203
- type: 'text';
204
- content: string;
205
- } | {
206
- type: 'link';
207
- url: string;
208
- label?: string;
209
- } | {
210
- type: 'mermaid';
211
- diagram: string;
212
- title?: string;
213
- } | {
214
- type: 'summary';
215
- content: string;
216
- title?: string;
217
- };
218
- interface PlanTaskItem {
219
- id?: string;
220
- number?: string;
221
- title: string;
222
- label?: string;
223
- description?: string;
224
- blocks?: PlanContentBlock[];
225
- [key: string]: unknown;
226
- }
227
- interface PlanPhaseItem {
228
- id?: string;
229
- title: string;
230
- status?: 'pending' | 'in-progress' | 'completed';
231
- tasks: PlanTaskItem[];
232
- [key: string]: unknown;
233
- }
234
- interface PlanPinConfig {
235
- title?: string;
236
- status?: 'draft' | 'in-progress' | 'completed';
237
- breadcrumbs?: Array<{
238
- label: string;
239
- }>;
240
- phases: PlanPhaseItem[];
241
- [key: string]: unknown;
242
- }
243
- interface NoteItem {
244
- id?: string;
245
- title: string;
246
- content?: string;
247
- order?: number;
248
- createdAt?: number;
249
- updatedAt?: number;
250
- }
251
- interface NotesPinConfig {
252
- notes?: NoteItem[];
253
- [key: string]: unknown;
254
- }
255
- interface CsvViewerPinConfig {
256
- csvText?: string;
257
- csvData?: Array<Record<string, unknown>>;
258
- fileName?: string;
259
- [key: string]: unknown;
260
- }
261
- interface UserStoryPinConfig {
262
- title?: string;
263
- userStory: string;
264
- acceptanceCriteria?: string;
265
- [key: string]: unknown;
266
- }
267
- interface ChatPinConfig {
268
- title?: string;
269
- placeholder?: string;
270
- /** Pin this discussion thread is about (commentary / feedback). */
271
- linked_pin_id?: string;
272
- /** Cached title for display without fetching the linked pin. */
273
- linked_pin_title?: string;
274
- [key: string]: unknown;
275
- }
276
- interface IntroPinConfig {
277
- heading: string;
278
- subheading?: string;
279
- [key: string]: unknown;
280
- }
281
- interface MastraPinConfig {
282
- mode?: 'workflow' | 'agent' | string;
283
- agentId?: string;
284
- workflowId?: string;
285
- [key: string]: unknown;
286
- }
287
- interface BusinessCardField {
288
- id: string;
289
- key: string;
290
- value: string;
291
- }
292
- interface BusinessCardPinConfig {
293
- sectionTitle?: string;
294
- fields?: BusinessCardField[];
295
- imageConfig?: {
296
- url?: string;
297
- alt?: string;
298
- fileId?: string;
299
- [key: string]: unknown;
300
- };
301
- imagePosition?: 'left' | 'right' | string;
302
- [key: string]: unknown;
303
- }
304
- interface VideoPinConfig {
305
- url?: string;
306
- fileId?: string;
307
- fileName?: string;
308
- mimeType?: 'video/mp4' | string;
309
- caption?: string;
310
- size?: number;
311
- [key: string]: unknown;
312
- }
313
- interface AudioPinTrack {
314
- url: string;
315
- fileId?: string;
316
- fileName?: string;
317
- mimeType?: 'audio/mpeg' | 'audio/wav' | 'audio/x-wav' | string;
318
- size?: number;
319
- [key: string]: unknown;
320
- }
321
- interface AudioPinConfig {
322
- url?: string;
323
- fileId?: string;
324
- fileName?: string;
325
- mimeType?: 'audio/mpeg' | 'audio/wav' | 'audio/x-wav' | string;
326
- caption?: string;
327
- size?: number;
328
- tracks?: AudioPinTrack[];
329
- [key: string]: unknown;
330
- }
331
- interface TextMediaPinConfig {
332
- title?: string;
333
- text?: string;
334
- subtext?: string;
335
- textPosition?: 'left' | 'right' | string;
336
- mediaType?: 'embed' | 'image' | string;
337
- embedConfig?: {
338
- type?: string;
339
- url?: string;
340
- aspectRatio?: string;
341
- autoplay?: boolean;
342
- [key: string]: unknown;
343
- };
344
- imageConfig?: {
345
- url?: string;
346
- alt?: string;
347
- fileId?: string;
348
- [key: string]: unknown;
349
- };
350
- [key: string]: unknown;
351
- }
352
- interface FileUploadPinConfig {
353
- files?: Array<Record<string, unknown>>;
354
- displayMode?: string;
355
- [key: string]: unknown;
356
- }
357
- interface KanbanBoardPinConfig {
358
- columns: KanbanColumn[];
359
- [key: string]: unknown;
360
- }
361
- interface ChecklistPinConfig {
362
- title?: string;
363
- items: ChecklistItem[];
364
- [key: string]: unknown;
365
- }
366
- interface ComparisonSideConfig {
367
- label: string;
368
- body: string;
369
- }
370
- interface ComparisonMatchPair {
371
- left: number;
372
- right: number;
373
- }
374
- interface ComparisonPinConfig {
375
- title?: string;
376
- left: ComparisonSideConfig;
377
- right: ComparisonSideConfig;
378
- highlightedLines?: {
379
- left?: number[];
380
- right?: number[];
381
- };
382
- matches?: ComparisonMatchPair[];
383
- showVsBadge?: boolean;
384
- [key: string]: unknown;
385
- }
386
- interface CalendarPinConfig {
387
- weekStartsOn?: number;
388
- events?: Array<Record<string, unknown>>;
389
- [key: string]: unknown;
390
- }
391
- interface RoadmapPinConfig {
392
- title?: string;
393
- months?: Array<Record<string, unknown>>;
394
- [key: string]: unknown;
395
- }
396
- interface RealtimeCanvasPinConfig {
397
- title?: string;
398
- description?: string;
399
- roomId?: string;
400
- [key: string]: unknown;
401
- }
402
- interface PinConfigByType {
403
- markdown: MarkdownPinConfig;
404
- image: ImagePinConfig;
405
- gallery: GalleryPinConfig;
406
- table: TablePinConfig;
407
- charts: ChartsPinConfig;
408
- mermaid: MermaidPinConfig;
409
- code: CodePinConfig;
410
- embed: EmbedPinConfig;
411
- 'pdf-viewer': PdfViewerPinConfig;
412
- 'excel-viewer': ExcelViewerPinConfig;
413
- 'stat-cards': StatCardsPinConfig;
414
- timeline: TimelinePinConfig;
415
- 'json-viewer': JsonViewerPinConfig;
416
- 'json-list': JsonListPinConfig;
417
- links: LinksPinConfig;
418
- 'qr-code': QrCodePinConfig;
419
- 'social-handles': SocialHandlesPinConfig;
420
- steps: StepsPinConfig;
421
- trace: TracePinConfig;
422
- plan: PlanPinConfig;
423
- notes: NotesPinConfig;
424
- 'csv-viewer': CsvViewerPinConfig;
425
- 'user-story': UserStoryPinConfig;
426
- chat: ChatPinConfig;
427
- intro: IntroPinConfig;
428
- mastra: MastraPinConfig;
429
- 'text-media': TextMediaPinConfig;
430
- 'business-card': BusinessCardPinConfig;
431
- video: VideoPinConfig;
432
- audio: AudioPinConfig;
433
- 'file-upload': FileUploadPinConfig;
434
- 'kanban-board': KanbanBoardPinConfig;
435
- checklist: ChecklistPinConfig;
436
- comparison: ComparisonPinConfig;
437
- calendar: CalendarPinConfig;
438
- roadmap: RoadmapPinConfig;
439
- 'realtime-canvas': RealtimeCanvasPinConfig;
440
- }
441
- interface PinMetadataBase {
442
- title: string;
443
- tags?: string[];
444
- description?: string;
445
- allow_edit?: boolean;
446
- require_sign_in?: boolean;
447
- allow_comments?: boolean;
448
- }
449
- type PinMetadata<T extends PinTypeId = PinTypeId> = PinMetadataBase & {
450
- pin_type?: T;
451
- pin_config?: PinConfigByType[T];
452
- pin_layout?: PinLayout;
453
- };
454
- interface CreateTypedPinRequest<T extends PinTypeId> {
455
- pin_type: T;
456
- pin_config: PinConfigByType[T];
457
- pin_layout?: PinLayout;
458
- is_public?: boolean;
459
- allow_edit?: boolean;
460
- require_sign_in?: boolean;
461
- allow_comments?: boolean;
462
- metadata: PinMetadataBase;
463
- pending_invites?: Record<string, 'editor' | 'viewer'>;
464
- /** @deprecated Inferred from pin_type */
465
- data_type?: PinDataType;
466
- }
467
- interface CreateNestedPinRequest<T extends PinTypeId> {
468
- pin_layout?: PinLayout;
469
- is_public?: boolean;
470
- allow_edit?: boolean;
471
- require_sign_in?: boolean;
472
- allow_comments?: boolean;
473
- metadata: PinMetadata<T> & PinMetadataBase;
474
- pending_invites?: Record<string, 'editor' | 'viewer'>;
475
- data_type?: PinDataType;
476
- }
477
- type CreatePinRequest<T extends PinTypeId = PinTypeId> = CreateTypedPinRequest<T> | CreateNestedPinRequest<T>;
478
- interface UpdatePinRequest<T extends PinTypeId = PinTypeId> {
479
- pin_type?: T;
480
- pin_config?: PinConfigByType[T];
481
- pin_layout?: PinLayout;
482
- is_public?: boolean;
483
- metadata?: Partial<PinMetadata<T>>;
484
- }
485
- interface Pin<T extends PinTypeId = PinTypeId> {
486
- id: string;
487
- owner_id: string;
488
- user_id?: string;
489
- title?: string;
490
- description?: string;
491
- data_type: PinDataType;
492
- is_public: boolean;
493
- allow_edit: boolean;
494
- require_sign_in: boolean;
495
- allow_comments: boolean;
496
- metadata?: PinMetadata<T>;
497
- created_at: string | number;
498
- updated_at: string | number;
499
- }
500
- interface SharePinRequest {
501
- is_public?: boolean;
502
- allow_edit?: boolean;
503
- require_sign_in?: boolean;
504
- allow_comments?: boolean;
505
- }
506
- interface ListPinsOptions {
507
- limit?: number;
508
- offset?: number;
509
- }
510
- interface CreatePinOptions {
511
- pin_layout?: PinLayout;
512
- is_public?: boolean;
513
- allow_edit?: boolean;
514
- require_sign_in?: boolean;
515
- allow_comments?: boolean;
516
- pending_invites?: Record<string, 'editor' | 'viewer'>;
517
- }
518
- /** Flat create input: metadata + pin_config fields (all pin types). */
519
- type CreatePinHelperInput<T extends PinTypeId> = PinMetadataBase & CreatePinOptions & PinConfigByType[T];
520
- /** Flat update input: optional metadata + partial pin_config fields. */
521
- type UpdatePinHelperInput<T extends PinTypeId> = {
522
- pin_layout?: PinLayout;
523
- is_public?: boolean;
524
- title?: string;
525
- tags?: string[];
526
- description?: string;
527
- metadata?: Partial<PinMetadataBase>;
528
- } & Partial<PinConfigByType[T]>;
529
- interface CreateMarkdownPinInput extends PinMetadataBase {
530
- content: string;
531
- pin_layout?: PinLayout;
532
- is_public?: boolean;
533
- allow_edit?: boolean;
534
- require_sign_in?: boolean;
535
- allow_comments?: boolean;
536
- pending_invites?: Record<string, 'editor' | 'viewer'>;
537
- }
538
- interface CreateStatCardsPinInput extends PinMetadataBase {
539
- cards: StatCardItem[];
540
- pin_layout?: PinLayout;
541
- is_public?: boolean;
542
- }
543
- interface CreateTablePinInput extends PinMetadataBase {
544
- columns: TableColumn[];
545
- rows?: TableRow[];
546
- pin_layout?: PinLayout;
547
- is_public?: boolean;
548
- }
549
- interface UpdateTablePinInput extends UpdatePinHelperInput<'table'> {
550
- }
551
- interface CreateEmbedPinInput extends PinMetadataBase {
552
- url: string;
553
- type?: string;
554
- pin_layout?: PinLayout;
555
- is_public?: boolean;
556
- }
557
-
558
- /**
559
- * API types shared by the v1 Pins client
560
- */
561
- interface ApiResponse<T = unknown> {
562
- success: boolean;
563
- data: T;
564
- error?: {
565
- code: string;
566
- message: string;
567
- details?: unknown;
568
- };
569
- }
570
- interface PaginatedResponse<T> {
571
- items: T[];
572
- total: number;
573
- limit: number;
574
- offset: number;
575
- }
576
-
577
- /**
578
- * Pins API Methods
579
- */
580
-
581
- declare class PinsMethods {
582
- private client;
583
- constructor(client: PindownClient);
584
- /** Create a pin (typed via CreatePinRequest&lt;T&gt;) */
585
- create<T extends PinTypeId>(request: CreatePinRequest<T>): Promise<Pin<T>>;
586
- /** Create helper for any pin type via flat typed input. */
587
- createPin<T extends PinTypeId>(pinType: T, input: CreatePinHelperInput<T>): Promise<Pin<T>>;
588
- get<T extends PinTypeId = PinTypeId>(pinId: string): Promise<Pin<T>>;
589
- list(options?: ListPinsOptions): Promise<PaginatedResponse<Pin>>;
590
- update<T extends PinTypeId = PinTypeId>(pinId: string, request: UpdatePinRequest<T>): Promise<Pin<T>>;
591
- /** Update helper for any pin type via flat typed input. */
592
- updatePin<T extends PinTypeId>(pinId: string, pinType: T, input: UpdatePinHelperInput<T>): Promise<Pin<T>>;
593
- delete(pinId: string): Promise<void>;
594
- share(pinId: string, request: SharePinRequest): Promise<Pin>;
595
- batchGet(pinIds: string[]): Promise<{
596
- found: Pin[];
597
- not_found: string[];
598
- permission_denied: string[];
599
- }>;
600
- batchCreate(pins: CreatePinRequest[]): Promise<{
601
- created: Array<{
602
- id: string;
603
- index: number;
604
- created_at: number;
605
- }>;
606
- failed: Array<{
607
- index: number;
608
- error: string;
609
- }>;
610
- }>;
611
- batchUpdate(updates: Array<{
612
- id: string;
613
- } & UpdatePinRequest>): Promise<{
614
- updated: string[];
615
- failed: Array<{
616
- id: string;
617
- error: string;
618
- }>;
619
- updated_at: number;
620
- }>;
621
- batchDelete(pinIds: string[]): Promise<{
622
- deleted: string[];
623
- failed: Array<{
624
- id: string;
625
- error: string;
626
- }>;
627
- }>;
628
- /** Create a markdown pin with pin_config.content (seeds Yjs on the server). */
629
- createMarkdown(input: CreateMarkdownPinInput): Promise<Pin<'markdown'>>;
630
- createStatCards(input: CreateStatCardsPinInput): Promise<Pin<'stat-cards'>>;
631
- createTable(input: CreateTablePinInput): Promise<Pin<'table'>>;
632
- /** Partial table pin_config update with typed columns/rows. */
633
- updateTable(pinId: string, input: UpdateTablePinInput): Promise<Pin<'table'>>;
634
- createEmbed(input: CreateEmbedPinInput): Promise<Pin<'embed'>>;
635
- /**
636
- * @deprecated Use createMarkdown({ title, content, ... }) — old signature ignored content in title
637
- */
638
- createMarkdownLegacy(title: string, additionalMetadata?: Record<string, unknown>): Promise<Pin<'markdown'>>;
639
- }
640
-
641
- /**
642
- * Configuration for the v1 Pins API client
643
- */
644
- interface PindownConfig {
645
- /** Workspace-plan API key from https://pindown.ai/api-keys */
646
- apiKey: string;
647
- /** @default 'https://api.pindown.ai/v1' */
648
- baseURL?: string;
649
- /** @default 3 */
650
- maxRetries?: number;
651
- /** @default 30000 */
652
- timeout?: number;
653
- }
654
-
655
- /**
656
- * Pindown API Client — v1 Pins API only
657
- */
658
-
659
- declare class PindownClient {
660
- private config;
661
- readonly pins: PinsMethods;
662
- constructor(config: PindownConfig);
663
- request<T = unknown>(method: string, endpoint: string, data?: unknown): Promise<T>;
664
- private handleErrorResponse;
665
- }
1
+ import { P as PinTypeId, C as CreatePinHelperInput, a as Pin, U as UpdatePinHelperInput, b as PinConfigByType, c as UpdatePinRequest, d as CreatePinRequest } from './PindownClient-Blc0tgqw.js';
2
+ export { h as ALL_PIN_TYPES, A as ApiResponse, a3 as AudioPinConfig, a4 as AudioPinTrack, a0 as BusinessCardField, a1 as BusinessCardPinConfig, a8 as CalendarPinConfig, z as ChartsPinConfig, Y as ChatPinConfig, u as ChecklistItem, a7 as ChecklistPinConfig, af as CreateEmbedPinInput, ab as CreateMarkdownPinInput, q as CreateNestedPinRequest, r as CreatePinOptions, ac as CreateStatCardsPinInput, ad as CreateTablePinInput, p as CreateTypedPinRequest, W as CsvViewerPinConfig, E as EmbedPinConfig, F as ExcelViewerPinConfig, a5 as FileUploadPinConfig, G as GalleryImage, x as GalleryPinConfig, I as ImagePinConfig, Z as IntroPinConfig, O as JsonListPinConfig, N as JsonViewerPinConfig, a6 as KanbanBoardPinConfig, K as KanbanColumn, v as LinkItem, Q as LinksPinConfig, L as ListPinsOptions, M as MarkdownPinConfig, _ as MastraPinConfig, B as MermaidPinConfig, i as PRODUCT_PIN_TYPES, g as PaginatedResponse, D as PdfViewerPinConfig, m as PinCardType, l as PinDataType, k as PinLayout, o as PinMetadata, n as PinMetadataBase, e as PindownClient, f as PindownConfig, j as ProductPinTypeId, R as QrCodePinConfig, aa as RealtimeCanvasPinConfig, a9 as RoadmapPinConfig, S as SharePinRequest, s as StatCardItem, H as StatCardsPinConfig, w as StepItem, V as StepsPinConfig, T as TableColumn, y as TablePinConfig, t as TableRow, $ as TextMediaPinConfig, J as TimelinePinConfig, ae as UpdateTablePinInput, X as UserStoryPinConfig, a2 as VideoPinConfig } from './PindownClient-Blc0tgqw.js';
666
3
 
667
4
  type CapitalizeWord<S extends string> = S extends `${infer C}${infer R}` ? `${Uppercase<C>}${R}` : S;
668
5
  type PascalFromKebab<S extends string> = S extends `${infer Head}-${infer Tail}` ? `${CapitalizeWord<Head>}${PascalFromKebab<Tail>}` : CapitalizeWord<S>;
@@ -704,6 +41,26 @@ declare function getPinConfigHint<T extends PinTypeId>(pinType: T): PinConfigHin
704
41
  /** Pretty-print field hints for CLI / logging. */
705
42
  declare function formatPinConfigHint(pinType: PinTypeId): string;
706
43
 
44
+ interface PinConfigValidationIssue {
45
+ pinType: PinTypeId;
46
+ message: string;
47
+ details?: unknown;
48
+ }
49
+ type PinConfigValidationResult = {
50
+ valid: true;
51
+ data: unknown;
52
+ } | ({
53
+ valid: false;
54
+ } & PinConfigValidationIssue);
55
+ /** Validate (and canonicalize) pin_config for any product pin type. */
56
+ declare function validatePinConfig<T extends PinTypeId>(pinType: T, pinConfig: unknown): PinConfigValidationResult;
57
+ /** Throws {@link ValidationError} when pin_config is invalid. Returns canonical validated config. */
58
+ declare function assertValidPinConfig<T extends PinTypeId>(pinType: T, pinConfig: unknown): PinConfigByType[T];
59
+ /** Validate + canonicalize a create payload before POST /pins. */
60
+ declare function prepareCreatePinRequest<T extends PinTypeId>(request: CreatePinRequest<T>): CreatePinRequest<T>;
61
+ /** Validate + canonicalize an update payload before PUT /pins/:id. */
62
+ declare function prepareUpdatePinRequest<T extends PinTypeId>(request: UpdatePinRequest<T>, pinTypeHint?: T): UpdatePinRequest<T>;
63
+
707
64
  /**
708
65
  * Error classes for the v1 Pins API client
709
66
  */
@@ -734,4 +91,4 @@ declare class NetworkError extends PindownError {
734
91
  constructor(message?: string);
735
92
  }
736
93
 
737
- export { ALL_PIN_TYPES, type ApiResponse, type AudioPinConfig, type AudioPinTrack, AuthenticationError, type BusinessCardField, type BusinessCardPinConfig, type CalendarPinConfig, type ChartsPinConfig, type ChatPinConfig, type ChecklistItem, type ChecklistPinConfig, type CreateEmbedPinInput, type CreateMarkdownPinInput, type CreateNestedPinRequest, type CreatePinHelperInput, type CreatePinOptions, type CreatePinRequest, type CreateStatCardsPinInput, type CreateTablePinInput, type CreateTypedPinRequest, type CsvViewerPinConfig, type EmbedPinConfig, type ExcelViewerPinConfig, type FileUploadPinConfig, ForbiddenError, type GalleryImage, type GalleryPinConfig, type ImagePinConfig, type IntroPinConfig, type JsonListPinConfig, type JsonViewerPinConfig, type KanbanBoardPinConfig, type KanbanColumn, type LinkItem, type LinksPinConfig, type ListPinsOptions, type MarkdownPinConfig, type MastraPinConfig, type MermaidPinConfig, NetworkError, NotFoundError, PIN_CONFIG_HINTS, PRODUCT_PIN_TYPES, type PaginatedResponse, type PdfViewerPinConfig, type Pin, type PinCardType, type PinConfigByType, type PinConfigFieldHint, type PinConfigHint, type PinCreateMethods, type PinDataType, type PinLayout, type PinMetadata, type PinMetadataBase, type PinTypeId, type PinTypedHelperMethods, type PinUpdateMethods, PindownClient, type PindownConfig, PindownError, type ProductPinTypeId, type QrCodePinConfig, RateLimitError, type RealtimeCanvasPinConfig, type RoadmapPinConfig, ServerError, type SharePinRequest, type StatCardItem, type StatCardsPinConfig, type StepItem, type StepsPinConfig, type TableColumn, type TablePinConfig, type TableRow, type TextMediaPinConfig, type TimelinePinConfig, type UpdatePinHelperInput, type UpdatePinRequest, type UpdateTablePinInput, type UserStoryPinConfig, ValidationError, type VideoPinConfig, formatPinConfigHint, getPinConfigHint };
94
+ export { AuthenticationError, CreatePinHelperInput, CreatePinRequest, ForbiddenError, NetworkError, NotFoundError, PIN_CONFIG_HINTS, Pin, PinConfigByType, type PinConfigFieldHint, type PinConfigHint, type PinConfigValidationIssue, type PinConfigValidationResult, type PinCreateMethods, PinTypeId, type PinTypedHelperMethods, type PinUpdateMethods, PindownError, RateLimitError, ServerError, UpdatePinHelperInput, UpdatePinRequest, ValidationError, assertValidPinConfig, formatPinConfigHint, getPinConfigHint, prepareCreatePinRequest, prepareUpdatePinRequest, validatePinConfig };