@pindownai/client-js 1.2.0 → 1.3.1

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
@@ -3,11 +3,9 @@
3
3
  * Aligned with backend-api/src/lib/pin-types.ts + pin-config-schemas.ts.
4
4
  * Import per-type *PinConfig interfaces for typed CRUD payloads.
5
5
  */
6
- declare const PRODUCT_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "steps", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "file-upload", "kanban-board", "checklist", "calendar", "roadmap", "realtime-canvas"];
7
- declare const LEGACY_PIN_TYPES: readonly ["line-chart", "tree"];
8
- declare const ALL_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "steps", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "file-upload", "kanban-board", "checklist", "calendar", "roadmap", "realtime-canvas", "line-chart", "tree"];
6
+ declare const PRODUCT_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "qr-code", "steps", "trace", "plan", "notes", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "business-card", "video", "file-upload", "kanban-board", "checklist", "calendar", "roadmap", "realtime-canvas"];
7
+ declare const ALL_PIN_TYPES: readonly ["markdown", "image", "gallery", "table", "charts", "mermaid", "embed", "pdf-viewer", "excel-viewer", "stat-cards", "timeline", "json-viewer", "json-list", "links", "qr-code", "steps", "trace", "plan", "notes", "csv-viewer", "user-story", "chat", "intro", "mastra", "text-media", "business-card", "video", "file-upload", "kanban-board", "checklist", "calendar", "roadmap", "realtime-canvas"];
9
8
  type ProductPinTypeId = (typeof PRODUCT_PIN_TYPES)[number];
10
- type LegacyPinTypeId = (typeof LEGACY_PIN_TYPES)[number];
11
9
  type PinTypeId = (typeof ALL_PIN_TYPES)[number];
12
10
  type PinLayout = '1x1' | '1x2' | '2x1' | '2x2' | '3x1' | '3x2' | '3x3' | '4x4';
13
11
  type PinDataType = 'markdown' | 'json' | 'text' | 'pin-card';
@@ -59,12 +57,6 @@ interface StepItem {
59
57
  description?: string;
60
58
  [key: string]: unknown;
61
59
  }
62
- interface TreeNode {
63
- id: string;
64
- label: string;
65
- children?: TreeNode[];
66
- [key: string]: unknown;
67
- }
68
60
  interface MarkdownPinConfig {
69
61
  content?: string;
70
62
  collaboration?: {
@@ -147,10 +139,98 @@ interface LinksPinConfig {
147
139
  links?: LinkItem[];
148
140
  [key: string]: unknown;
149
141
  }
142
+ interface QrCodePinConfig {
143
+ url?: string;
144
+ label?: string;
145
+ [key: string]: unknown;
146
+ }
150
147
  interface StepsPinConfig {
151
148
  steps: StepItem[];
152
149
  [key: string]: unknown;
153
150
  }
151
+ type TraceSpanStatus = 'completed' | 'running' | 'pending' | 'failed';
152
+ type TraceSpanType = 'system' | 'agent' | 'tool';
153
+ interface TraceSpanItem {
154
+ id?: string;
155
+ type?: TraceSpanType;
156
+ name: string;
157
+ status: TraceSpanStatus;
158
+ timestamp?: string;
159
+ duration?: string;
160
+ details?: string;
161
+ }
162
+ interface TracePinConfig {
163
+ title?: string;
164
+ live?: boolean;
165
+ spans: TraceSpanItem[];
166
+ [key: string]: unknown;
167
+ }
168
+ type PlanContentBlock = {
169
+ type: 'details';
170
+ title?: string;
171
+ items: string[];
172
+ } | {
173
+ type: 'command';
174
+ command: string;
175
+ label?: string;
176
+ } | {
177
+ type: 'code';
178
+ code: string;
179
+ language?: string;
180
+ filename?: string;
181
+ } | {
182
+ type: 'text';
183
+ content: string;
184
+ } | {
185
+ type: 'link';
186
+ url: string;
187
+ label?: string;
188
+ } | {
189
+ type: 'mermaid';
190
+ diagram: string;
191
+ title?: string;
192
+ } | {
193
+ type: 'summary';
194
+ content: string;
195
+ title?: string;
196
+ };
197
+ interface PlanTaskItem {
198
+ id?: string;
199
+ number?: string;
200
+ title: string;
201
+ label?: string;
202
+ description?: string;
203
+ blocks?: PlanContentBlock[];
204
+ [key: string]: unknown;
205
+ }
206
+ interface PlanPhaseItem {
207
+ id?: string;
208
+ title: string;
209
+ status?: 'pending' | 'in-progress' | 'completed';
210
+ tasks: PlanTaskItem[];
211
+ [key: string]: unknown;
212
+ }
213
+ interface PlanPinConfig {
214
+ title?: string;
215
+ status?: 'draft' | 'in-progress' | 'completed';
216
+ breadcrumbs?: Array<{
217
+ label: string;
218
+ }>;
219
+ phases: PlanPhaseItem[];
220
+ [key: string]: unknown;
221
+ }
222
+ interface NoteItem {
223
+ id?: string;
224
+ title: string;
225
+ content?: string;
226
+ order?: number;
227
+ createdAt?: number;
228
+ updatedAt?: number;
229
+ }
230
+ interface NotesPinConfig {
231
+ notes?: NoteItem[];
232
+ [key: string]: unknown;
233
+ }
154
234
  interface CsvViewerPinConfig {
155
235
  csvText?: string;
156
236
  csvData?: Array<Record<string, unknown>>;
@@ -179,10 +259,51 @@ interface MastraPinConfig {
179
259
  workflowId?: string;
180
260
  [key: string]: unknown;
181
261
  }
262
+ interface BusinessCardField {
263
+ id: string;
264
+ key: string;
265
+ value: string;
266
+ }
267
+ interface BusinessCardPinConfig {
268
+ sectionTitle?: string;
269
+ fields?: BusinessCardField[];
270
+ imageConfig?: {
271
+ url?: string;
272
+ alt?: string;
273
+ fileId?: string;
274
+ [key: string]: unknown;
275
+ };
276
+ imagePosition?: 'left' | 'right' | string;
277
+ [key: string]: unknown;
278
+ }
279
+ interface VideoPinConfig {
280
+ url?: string;
281
+ fileId?: string;
282
+ fileName?: string;
283
+ mimeType?: 'video/mp4' | string;
284
+ caption?: string;
285
+ size?: number;
286
+ [key: string]: unknown;
287
+ }
182
288
  interface TextMediaPinConfig {
183
289
  title?: string;
184
290
  text?: string;
291
+ subtext?: string;
185
292
  textPosition?: 'left' | 'right' | string;
293
+ mediaType?: 'embed' | 'image' | string;
294
+ embedConfig?: {
295
+ type?: string;
296
+ url?: string;
297
+ aspectRatio?: string;
298
+ autoplay?: boolean;
299
+ [key: string]: unknown;
300
+ };
301
+ imageConfig?: {
302
+ url?: string;
303
+ alt?: string;
304
+ fileId?: string;
305
+ [key: string]: unknown;
306
+ };
186
307
  [key: string]: unknown;
187
308
  }
188
309
  interface FileUploadPinConfig {
@@ -215,12 +336,6 @@ interface RealtimeCanvasPinConfig {
215
336
  roomId?: string;
216
337
  [key: string]: unknown;
217
338
  }
218
- interface LineChartPinConfig extends ChartsPinConfig {
219
- }
220
- interface TreePinConfig {
221
- nodes?: TreeNode[];
222
- [key: string]: unknown;
223
- }
224
339
  interface PinConfigByType {
225
340
  markdown: MarkdownPinConfig;
226
341
  image: ImagePinConfig;
@@ -236,21 +351,25 @@ interface PinConfigByType {
236
351
  'json-viewer': JsonViewerPinConfig;
237
352
  'json-list': JsonListPinConfig;
238
353
  links: LinksPinConfig;
354
+ 'qr-code': QrCodePinConfig;
239
355
  steps: StepsPinConfig;
356
+ trace: TracePinConfig;
357
+ plan: PlanPinConfig;
358
+ notes: NotesPinConfig;
240
359
  'csv-viewer': CsvViewerPinConfig;
241
360
  'user-story': UserStoryPinConfig;
242
361
  chat: ChatPinConfig;
243
362
  intro: IntroPinConfig;
244
363
  mastra: MastraPinConfig;
245
364
  'text-media': TextMediaPinConfig;
365
+ 'business-card': BusinessCardPinConfig;
366
+ video: VideoPinConfig;
246
367
  'file-upload': FileUploadPinConfig;
247
368
  'kanban-board': KanbanBoardPinConfig;
248
369
  checklist: ChecklistPinConfig;
249
370
  calendar: CalendarPinConfig;
250
371
  roadmap: RoadmapPinConfig;
251
372
  'realtime-canvas': RealtimeCanvasPinConfig;
252
- 'line-chart': LineChartPinConfig;
253
- tree: TreePinConfig;
254
373
  }
255
374
  interface PinMetadataBase {
256
375
  title: string;
@@ -349,16 +468,15 @@ interface CreateEmbedPinInput extends PinMetadataBase {
349
468
  }
350
469
 
351
470
  /**
352
- * API Types for Pindown
471
+ * API types shared by the v1 Pins client
353
472
  */
354
-
355
- interface ApiResponse<T = any> {
473
+ interface ApiResponse<T = unknown> {
356
474
  success: boolean;
357
475
  data: T;
358
476
  error?: {
359
477
  code: string;
360
478
  message: string;
361
- details?: any;
479
+ details?: unknown;
362
480
  };
363
481
  }
364
482
  interface PaginatedResponse<T> {
@@ -367,173 +485,6 @@ interface PaginatedResponse<T> {
367
485
  limit: number;
368
486
  offset: number;
369
487
  }
370
- interface Pinboard {
371
- id: string;
372
- user_id: string;
373
- title: string;
374
- tags?: string[];
375
- layout?: Record<string, any>;
376
- mobile_layout?: Record<string, any>;
377
- pins?: Pin[];
378
- is_public: boolean;
379
- allow_comments: boolean;
380
- require_sign_in: boolean;
381
- created_at: string;
382
- updated_at: string;
383
- }
384
- interface CreatePinboardRequest {
385
- title: string;
386
- tags?: string[];
387
- layout?: Record<string, any>;
388
- mobile_layout?: Record<string, any>;
389
- }
390
- interface UpdatePinboardRequest {
391
- title?: string;
392
- tags?: string[];
393
- is_public?: boolean;
394
- allow_comments?: boolean;
395
- require_sign_in?: boolean;
396
- }
397
- interface AddPinToPinboardRequest {
398
- pin_id: string;
399
- position?: {
400
- x: number;
401
- y: number;
402
- w: number;
403
- h: number;
404
- };
405
- }
406
- interface UpdatePinboardLayoutRequest {
407
- layout?: Record<string, any>;
408
- mobile_layout?: Record<string, any>;
409
- }
410
- interface Page {
411
- id: string;
412
- owner_id: string;
413
- is_public: boolean;
414
- metadata: {
415
- title: string;
416
- description?: string;
417
- tags: string[];
418
- created_at: string;
419
- updated_at?: string;
420
- };
421
- pins: string[];
422
- layout?: Record<string, any>;
423
- created_at: number;
424
- updated_at: number;
425
- }
426
- interface CreatePageRequest {
427
- metadata: {
428
- title: string;
429
- description?: string;
430
- tags?: string[];
431
- };
432
- pins?: string[];
433
- layout?: Record<string, any>;
434
- is_public?: boolean;
435
- allow_comments?: boolean;
436
- require_sign_in?: boolean;
437
- include_datasets?: boolean;
438
- }
439
- interface UpdatePageRequest {
440
- metadata?: {
441
- title?: string;
442
- description?: string;
443
- tags?: string[];
444
- };
445
- is_public?: boolean;
446
- allow_comments?: boolean;
447
- require_sign_in?: boolean;
448
- include_datasets?: boolean;
449
- }
450
- interface AddPinToPageRequest {
451
- pin_id: string;
452
- }
453
- interface ListPagesOptions {
454
- limit?: number;
455
- offset?: number;
456
- }
457
- type DatasetType = 'json' | 'markdown';
458
- interface Dataset {
459
- id: string;
460
- user_id: string;
461
- name: string;
462
- type: DatasetType;
463
- data: any;
464
- created_at: string;
465
- updated_at: string;
466
- }
467
- interface CreateDatasetRequest {
468
- name: string;
469
- type: DatasetType;
470
- data: any;
471
- }
472
- interface UpdateDatasetRequest {
473
- name?: string;
474
- type?: DatasetType;
475
- data?: any;
476
- }
477
- type BlockType = 'markdown' | 'mermaid' | 'conditional' | 'image' | 'stat-cards' | 'line-chart' | 'flexible-table' | 'embed';
478
- interface Block {
479
- id: string;
480
- pin_id?: string;
481
- title: string;
482
- type: BlockType;
483
- template: string | Record<string, any>;
484
- order: number;
485
- created_at?: string;
486
- updated_at?: string;
487
- }
488
- interface CreateBlockRequest {
489
- title: string;
490
- type: BlockType;
491
- template: string | Record<string, any>;
492
- order?: number;
493
- }
494
- interface UpdateBlockRequest {
495
- title?: string;
496
- type?: BlockType;
497
- template?: string | Record<string, any>;
498
- order?: number;
499
- }
500
- type CollaboratorRole = 'viewer' | 'editor' | 'owner';
501
- interface Collaborator {
502
- user_id: string;
503
- email: string;
504
- role: CollaboratorRole;
505
- added_at: string;
506
- }
507
- interface InviteCollaboratorRequest {
508
- email: string;
509
- role: CollaboratorRole;
510
- }
511
- interface UpdateCollaboratorRoleRequest {
512
- role: CollaboratorRole;
513
- }
514
- interface Permissions {
515
- role: CollaboratorRole;
516
- can_view: boolean;
517
- can_edit: boolean;
518
- can_delete: boolean;
519
- can_share: boolean;
520
- can_manage_collaborators: boolean;
521
- }
522
- interface RateLimitInfo {
523
- tier: string;
524
- minute: {
525
- limit: number;
526
- used: number;
527
- remaining: number;
528
- resetAt: Date;
529
- };
530
- hour: {
531
- limit: number;
532
- used: number;
533
- remaining: number;
534
- resetAt: Date;
535
- };
536
- }
537
488
 
538
489
  /**
539
490
  * Pins API Methods
@@ -594,367 +545,34 @@ declare class PinsMethods {
594
545
  }
595
546
 
596
547
  /**
597
- * Pinboards API Methods
548
+ * Configuration for the v1 Pins API client
598
549
  */
599
-
600
- declare class PinboardsMethods {
601
- private client;
602
- constructor(client: PindownClient);
603
- /**
604
- * Create a new pinboard
605
- */
606
- create(request: CreatePinboardRequest): Promise<Pinboard>;
607
- /**
608
- * Get a pinboard by ID
609
- */
610
- get(boardId: string): Promise<Pinboard>;
611
- /**
612
- * List all pinboards
613
- */
614
- list(): Promise<Pinboard[]>;
615
- /**
616
- * Update a pinboard
617
- */
618
- update(boardId: string, request: UpdatePinboardRequest): Promise<Pinboard>;
619
- /**
620
- * Delete a pinboard
621
- */
622
- delete(boardId: string): Promise<void>;
623
- /**
624
- * Add a pin to a pinboard
625
- */
626
- addPin(boardId: string, request: AddPinToPinboardRequest): Promise<Pinboard>;
627
- /**
628
- * Remove a pin from a pinboard
629
- */
630
- removePin(boardId: string, pinId: string): Promise<void>;
631
- /**
632
- * Update pinboard layout
633
- */
634
- updateLayout(boardId: string, request: UpdatePinboardLayoutRequest): Promise<Pinboard>;
635
- /**
636
- * Update pinboard sharing settings
637
- */
638
- share(boardId: string, request: {
639
- is_public?: boolean;
640
- require_sign_in?: boolean;
641
- allow_comments?: boolean;
642
- }): Promise<Pinboard>;
643
- /**
644
- * Get multiple pinboards by IDs in a single request (max 100 pinboards)
645
- */
646
- batchGet(pinboardIds: string[]): Promise<{
647
- found: Pinboard[];
648
- not_found: string[];
649
- permission_denied: string[];
650
- }>;
651
- /**
652
- * Add multiple pins to a pinboard with layout in a single request (max 50 pins)
653
- */
654
- batchAddPins(boardId: string, pinIds: string[], layout?: Record<string, {
655
- x: number;
656
- y: number;
657
- w: number;
658
- h: number;
659
- }>): Promise<{
660
- added: string[];
661
- failed: Array<{
662
- id: string;
663
- error: string;
664
- }>;
665
- layout_updated: boolean;
666
- }>;
667
- /**
668
- * Remove multiple pins from a pinboard in a single request (max 50 pins)
669
- */
670
- batchRemovePins(boardId: string, pinIds: string[]): Promise<{
671
- removed: string[];
672
- failed: Array<{
673
- id: string;
674
- error: string;
675
- }>;
676
- }>;
677
- /**
678
- * Create a custom role for a pinboard (max 5 roles per pinboard)
679
- */
680
- createRole(boardId: string, request: {
681
- name: string;
682
- color: string;
683
- permissions?: Record<string, any>;
684
- }): Promise<{
685
- roleId: string;
686
- name: string;
687
- color: string;
688
- }>;
689
- /**
690
- * List custom roles for a pinboard
691
- */
692
- listRoles(boardId: string): Promise<Record<string, any>>;
693
- /**
694
- * Update a custom role
695
- */
696
- updateRole(boardId: string, roleId: string, request: {
697
- name?: string;
698
- color?: string;
699
- permissions?: Record<string, any>;
700
- }): Promise<void>;
701
- /**
702
- * Delete a custom role
703
- */
704
- deleteRole(boardId: string, roleId: string): Promise<void>;
705
- /**
706
- * Assign custom roles to a user (user must be a collaborator first)
707
- */
708
- assignUserRoles(boardId: string, userId: string, roleIds: string[]): Promise<void>;
709
- /**
710
- * Set role requirements for a pin (only users with these roles can see the pin)
711
- */
712
- setPinRoleRequirements(boardId: string, pinId: string, roleIds: string[]): Promise<void>;
713
- }
714
-
715
- /**
716
- * Pages API Methods
717
- */
718
-
719
- declare class PagesMethods {
720
- private client;
721
- constructor(client: PindownClient);
722
- /**
723
- * Create a new page
724
- */
725
- create(request: CreatePageRequest): Promise<Page>;
726
- /**
727
- * Get a page by ID
728
- */
729
- get(pageId: string): Promise<Page>;
730
- /**
731
- * List all pages
732
- */
733
- list(options?: ListPagesOptions): Promise<{
734
- pages: Page[];
735
- total: number;
736
- }>;
737
- /**
738
- * List pages shared with user
739
- */
740
- listShared(options?: ListPagesOptions): Promise<{
741
- pages: Page[];
742
- total: number;
743
- }>;
744
- /**
745
- * Update a page
746
- */
747
- update(pageId: string, request: UpdatePageRequest): Promise<Page>;
748
- /**
749
- * Delete a page
750
- */
751
- delete(pageId: string): Promise<void>;
752
- /**
753
- * Add a pin to a page
754
- */
755
- addPin(pageId: string, request: AddPinToPageRequest): Promise<void>;
756
- /**
757
- * Remove a pin from a page
758
- */
759
- removePin(pageId: string, pinId: string): Promise<void>;
760
- /**
761
- * List pins in a page
762
- */
763
- listPins(pageId: string): Promise<{
764
- pins: string[];
765
- total: number;
766
- }>;
767
- /**
768
- * Get multiple pages by IDs in a single request (max 100 pages)
769
- */
770
- batchGet(pageIds: string[]): Promise<{
771
- found: Page[];
772
- not_found: string[];
773
- permission_denied: string[];
774
- }>;
775
- /**
776
- * Create multiple pages in a single request (max 50 pages)
777
- */
778
- batchCreate(pages: CreatePageRequest[]): Promise<{
779
- created: Array<{
780
- id: string;
781
- index: number;
782
- created_at: number;
783
- }>;
784
- failed: Array<{
785
- index: number;
786
- error: string;
787
- }>;
788
- }>;
789
- /**
790
- * Update multiple pages in a single request (max 50 pages)
791
- */
792
- batchUpdate(updates: Array<{
793
- id: string;
794
- } & UpdatePageRequest>): Promise<{
795
- updated: string[];
796
- failed: Array<{
797
- id: string;
798
- error: string;
799
- }>;
800
- updated_at: number;
801
- }>;
802
- /**
803
- * Delete multiple pages in a single request (max 50 pages)
804
- */
805
- batchDelete(pageIds: string[]): Promise<{
806
- deleted: string[];
807
- failed: Array<{
808
- id: string;
809
- error: string;
810
- }>;
811
- }>;
812
- }
813
-
814
- /**
815
- * Collaborators API Methods
816
- */
817
-
818
- declare class CollaboratorsMethods {
819
- private client;
820
- constructor(client: PindownClient);
821
- /**
822
- * List collaborators for a pin
823
- */
824
- listForPin(pinId: string): Promise<{
825
- owner: Collaborator;
826
- collaborators: Collaborator[];
827
- pending_invites: Array<{
828
- email: string;
829
- role: string;
830
- invited_at: string;
831
- }>;
832
- }>;
833
- /**
834
- * Invite a collaborator to a pin
835
- */
836
- inviteToPin(pinId: string, request: InviteCollaboratorRequest): Promise<void>;
837
- /**
838
- * Update a pin collaborator's role
839
- */
840
- updatePinRole(pinId: string, userId: string, request: UpdateCollaboratorRoleRequest): Promise<void>;
841
- /**
842
- * Remove a collaborator from a pin
843
- */
844
- removeFromPin(pinId: string, userId: string): Promise<void>;
845
- /**
846
- * Get current user's permissions for a pin
847
- */
848
- getPinPermissions(pinId: string): Promise<Permissions>;
849
- /**
850
- * List collaborators for a pinboard
851
- */
852
- listForPinboard(boardId: string): Promise<{
853
- owner: Collaborator;
854
- collaborators: Collaborator[];
855
- pending_invites: Array<{
856
- email: string;
857
- role: string;
858
- invited_at: string;
859
- }>;
860
- }>;
861
- /**
862
- * Invite a collaborator to a pinboard
863
- */
864
- inviteToPinboard(boardId: string, request: InviteCollaboratorRequest): Promise<void>;
865
- /**
866
- * Update a pinboard collaborator's role
867
- */
868
- updatePinboardRole(boardId: string, userId: string, request: UpdateCollaboratorRoleRequest): Promise<void>;
869
- /**
870
- * Remove a collaborator from a pinboard
871
- */
872
- removeFromPinboard(boardId: string, userId: string): Promise<void>;
873
- /**
874
- * Get current user's permissions for a pinboard
875
- */
876
- getPinboardPermissions(boardId: string): Promise<Permissions>;
877
- }
878
-
879
- /**
880
- * Configuration types for Pindown API Client
881
- */
882
- type Tier = 'starter' | 'hobby' | 'pro' | 'teams' | 'agency';
883
550
  interface PindownConfig {
884
- /**
885
- * Your Pindown API key (from https://pindown.ai/api-keys)
886
- */
551
+ /** Workspace-plan API key from https://pindown.ai/api-keys */
887
552
  apiKey: string;
888
- /**
889
- * Your subscription tier (auto-detected from server if not provided)
890
- * @internal Only use for testing - production should auto-detect
891
- */
892
- tier?: Tier;
893
- /**
894
- * Base URL for the API
895
- * @default 'https://api.pindown.ai/v1'
896
- */
553
+ /** @default 'https://api.pindown.ai/v1' */
897
554
  baseURL?: string;
898
- /**
899
- * Enable rate limit tracking
900
- * @default true
901
- */
902
- enableRateLimitTracking?: boolean;
903
- /**
904
- * Maximum number of retry attempts for failed requests
905
- * @default 3
906
- */
555
+ /** @default 3 */
907
556
  maxRetries?: number;
908
- /**
909
- * Timeout for requests in milliseconds
910
- * @default 30000 (30 seconds)
911
- */
557
+ /** @default 30000 */
912
558
  timeout?: number;
913
559
  }
914
560
 
915
561
  /**
916
- * Pindown API Client
562
+ * Pindown API Client — v1 Pins API only
917
563
  */
918
564
 
919
565
  declare class PindownClient {
920
566
  private config;
921
- private rateLimiter?;
922
- private tierDetected;
923
567
  readonly pins: PinsMethods;
924
- readonly pinboards: PinboardsMethods;
925
- readonly pages: PagesMethods;
926
- readonly collaborators: CollaboratorsMethods;
927
568
  constructor(config: PindownConfig);
928
- /**
929
- * Core request method
930
- */
931
- request<T = any>(method: string, endpoint: string, data?: any): Promise<T>;
932
- /**
933
- * Handle error responses from API
934
- */
569
+ request<T = unknown>(method: string, endpoint: string, data?: unknown): Promise<T>;
935
570
  private handleErrorResponse;
936
- /**
937
- * Detect tier from response headers
938
- */
939
- private detectTierFromHeaders;
940
- /**
941
- * Get current rate limit info
942
- */
943
- getRateLimitInfo(): RateLimitInfo | null;
944
- /**
945
- * Get current tier
946
- */
947
- getTier(): Tier | null;
948
- /**
949
- * Destroy the client (cleanup resources)
950
- */
951
- destroy(): void;
952
571
  }
953
572
 
954
573
  /**
955
- * Error classes for Pindown API Client
574
+ * Error classes for the v1 Pins API client
956
575
  */
957
-
958
576
  declare class PindownError extends Error {
959
577
  constructor(message: string);
960
578
  }
@@ -968,24 +586,11 @@ declare class NotFoundError extends PindownError {
968
586
  constructor(resource: string);
969
587
  }
970
588
  declare class ValidationError extends PindownError {
971
- details?: any;
972
- constructor(message: string, details?: any);
589
+ details?: unknown;
590
+ constructor(message: string, details?: unknown);
973
591
  }
974
592
  declare class RateLimitError extends PindownError {
975
- window: 'minute' | 'hour';
976
- limit: number;
977
- used: number;
978
- remaining: number;
979
- resetAt: Date;
980
- tier: Tier;
981
- constructor(params: {
982
- window: 'minute' | 'hour';
983
- limit: number;
984
- used: number;
985
- remaining: number;
986
- resetAt: Date;
987
- tier: Tier;
988
- });
593
+ constructor(message?: string);
989
594
  }
990
595
  declare class ServerError extends PindownError {
991
596
  statusCode: number;
@@ -995,4 +600,4 @@ declare class NetworkError extends PindownError {
995
600
  constructor(message?: string);
996
601
  }
997
602
 
998
- export { ALL_PIN_TYPES, type AddPinToPageRequest, type AddPinToPinboardRequest, type ApiResponse, AuthenticationError, type Block, type BlockType, type CalendarPinConfig, type ChartsPinConfig, type ChatPinConfig, type ChecklistItem, type ChecklistPinConfig, type Collaborator, type CollaboratorRole, type CreateBlockRequest, type CreateDatasetRequest, type CreateEmbedPinInput, type CreateMarkdownPinInput, type CreateNestedPinRequest, type CreatePageRequest, type CreatePinRequest, type CreatePinboardRequest, type CreateStatCardsPinInput, type CreateTablePinInput, type CreateTypedPinRequest, type CsvViewerPinConfig, type Dataset, type DatasetType, type EmbedPinConfig, type ExcelViewerPinConfig, type FileUploadPinConfig, ForbiddenError, type GalleryImage, type GalleryPinConfig, type ImagePinConfig, type IntroPinConfig, type InviteCollaboratorRequest, type JsonListPinConfig, type JsonViewerPinConfig, type KanbanBoardPinConfig, type KanbanColumn, LEGACY_PIN_TYPES, type LegacyPinTypeId, type LineChartPinConfig, type LinkItem, type LinksPinConfig, type ListPagesOptions, type ListPinsOptions, type MarkdownPinConfig, type MastraPinConfig, type MermaidPinConfig, NetworkError, NotFoundError, PRODUCT_PIN_TYPES, type Page, type PaginatedResponse, type PdfViewerPinConfig, type Permissions, type Pin, type PinCardType, type PinConfigByType, type PinDataType, type PinLayout, type PinMetadata, type PinMetadataBase, type PinTypeId, type Pinboard, PindownClient, type PindownConfig, PindownError, type ProductPinTypeId, RateLimitError, type RateLimitInfo, type RealtimeCanvasPinConfig, type RoadmapPinConfig, ServerError, type SharePinRequest, type StatCardItem, type StatCardsPinConfig, type StepItem, type StepsPinConfig, type TableColumn, type TablePinConfig, type TableRow, type TextMediaPinConfig, type Tier, type TimelinePinConfig, type TreeNode, type TreePinConfig, type UpdateBlockRequest, type UpdateCollaboratorRoleRequest, type UpdateDatasetRequest, type UpdatePageRequest, type UpdatePinRequest, type UpdatePinboardLayoutRequest, type UpdatePinboardRequest, type UserStoryPinConfig, ValidationError };
603
+ export { ALL_PIN_TYPES, type ApiResponse, AuthenticationError, type BusinessCardField, type BusinessCardPinConfig, type CalendarPinConfig, type ChartsPinConfig, type ChatPinConfig, type ChecklistItem, type ChecklistPinConfig, type CreateEmbedPinInput, type CreateMarkdownPinInput, type CreateNestedPinRequest, 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, PRODUCT_PIN_TYPES, type PaginatedResponse, type PdfViewerPinConfig, type Pin, type PinCardType, type PinConfigByType, type PinDataType, type PinLayout, type PinMetadata, type PinMetadataBase, type PinTypeId, 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 UpdatePinRequest, type UserStoryPinConfig, ValidationError, type VideoPinConfig };