@dazl/internal-api-client 1.3.1 → 1.4.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.
@@ -1,6 +1,9 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
+ export type ErrorResponse = {
5
+ message: string;
6
+ };
4
7
  export type BillingProduct = {
5
8
  prices: Array<BillingPrice>;
6
9
  product: StripeProduct;
@@ -62,6 +65,27 @@ export type ScheduledUpdate = {
62
65
  type: 'cancel';
63
66
  updateTime: number;
64
67
  };
68
+ export type Deployment = {
69
+ projectId: string;
70
+ netlifyDeployId: string;
71
+ netlifySiteId: string;
72
+ productionURL: string;
73
+ publishedAt: string;
74
+ createdAt: string;
75
+ };
76
+ export type ProjectRaw = {
77
+ id: string;
78
+ name: string;
79
+ userId: number;
80
+ createdAt: string;
81
+ lastOpenedAt: string | null;
82
+ latestScreenshot: string | null;
83
+ originTemplateId: string | null;
84
+ archivedAt: string | null;
85
+ };
86
+ export type OwnerDazlId = {
87
+ ownerDazlId: string;
88
+ };
65
89
  export type UploadConfiguration = {
66
90
  /**
67
91
  * Presigned URL for uploading the file
@@ -223,27 +247,19 @@ export type GetByDazlIdErrors = {
223
247
  /**
224
248
  * Unauthorized
225
249
  */
226
- 401: {
227
- message: string;
228
- };
250
+ 401: ErrorResponse;
229
251
  /**
230
252
  * Forbidden
231
253
  */
232
- 403: {
233
- message: string;
234
- };
254
+ 403: ErrorResponse;
235
255
  /**
236
256
  * Not Found
237
257
  */
238
- 404: {
239
- message: string;
240
- };
258
+ 404: ErrorResponse;
241
259
  /**
242
260
  * Internal server error
243
261
  */
244
- 500: {
245
- message: string;
246
- };
262
+ 500: ErrorResponse;
247
263
  };
248
264
  export type GetByDazlIdError = GetByDazlIdErrors[keyof GetByDazlIdErrors];
249
265
  export type GetByDazlIdResponses = {
@@ -280,27 +296,19 @@ export type UpdateByDazlIdErrors = {
280
296
  /**
281
297
  * Unauthorized
282
298
  */
283
- 401: {
284
- message: string;
285
- };
299
+ 401: ErrorResponse;
286
300
  /**
287
301
  * Forbidden
288
302
  */
289
- 403: {
290
- message: string;
291
- };
303
+ 403: ErrorResponse;
292
304
  /**
293
305
  * Not Found
294
306
  */
295
- 404: {
296
- message: string;
297
- };
307
+ 404: ErrorResponse;
298
308
  /**
299
309
  * Internal server error
300
310
  */
301
- 500: {
302
- message: string;
303
- };
311
+ 500: ErrorResponse;
304
312
  };
305
313
  export type UpdateByDazlIdError = UpdateByDazlIdErrors[keyof UpdateByDazlIdErrors];
306
314
  export type UpdateByDazlIdResponses = {
@@ -312,60 +320,6 @@ export type UpdateByDazlIdResponses = {
312
320
  };
313
321
  };
314
322
  export type UpdateByDazlIdResponse = UpdateByDazlIdResponses[keyof UpdateByDazlIdResponses];
315
- export type GetBalanceByDazlIdData = {
316
- body?: never;
317
- path: {
318
- dazlId: string;
319
- };
320
- query?: never;
321
- url: '/billing/balance/{dazlId}';
322
- };
323
- export type GetBalanceByDazlIdErrors = {
324
- /**
325
- * Bad request - Invalid parameters or malformed JSON
326
- */
327
- 400: {
328
- message: string;
329
- issues?: string;
330
- };
331
- /**
332
- * Unauthorized
333
- */
334
- 401: {
335
- message: string;
336
- };
337
- /**
338
- * Forbidden
339
- */
340
- 403: {
341
- message: string;
342
- };
343
- /**
344
- * Not Found
345
- */
346
- 404: {
347
- message: string;
348
- };
349
- /**
350
- * Internal server error
351
- */
352
- 500: {
353
- message: string;
354
- };
355
- };
356
- export type GetBalanceByDazlIdError = GetBalanceByDazlIdErrors[keyof GetBalanceByDazlIdErrors];
357
- export type GetBalanceByDazlIdResponses = {
358
- /**
359
- * Returns user credit balance
360
- */
361
- 200: {
362
- balance: number;
363
- productId: string | null;
364
- priceId: string | null;
365
- isSubscriptionFree: boolean | null;
366
- };
367
- };
368
- export type GetBalanceByDazlIdResponse = GetBalanceByDazlIdResponses[keyof GetBalanceByDazlIdResponses];
369
323
  export type GetHasSufficientCreditsByDazlIdData = {
370
324
  body?: never;
371
325
  path: {
@@ -385,27 +339,19 @@ export type GetHasSufficientCreditsByDazlIdErrors = {
385
339
  /**
386
340
  * Unauthorized
387
341
  */
388
- 401: {
389
- message: string;
390
- };
342
+ 401: ErrorResponse;
391
343
  /**
392
344
  * Forbidden
393
345
  */
394
- 403: {
395
- message: string;
396
- };
346
+ 403: ErrorResponse;
397
347
  /**
398
348
  * Not Found
399
349
  */
400
- 404: {
401
- message: string;
402
- };
350
+ 404: ErrorResponse;
403
351
  /**
404
352
  * Internal server error
405
353
  */
406
- 500: {
407
- message: string;
408
- };
354
+ 500: ErrorResponse;
409
355
  };
410
356
  export type GetHasSufficientCreditsByDazlIdError = GetHasSufficientCreditsByDazlIdErrors[keyof GetHasSufficientCreditsByDazlIdErrors];
411
357
  export type GetHasSufficientCreditsByDazlIdResponses = {
@@ -434,27 +380,19 @@ export type GetAllProductsErrors = {
434
380
  /**
435
381
  * Unauthorized
436
382
  */
437
- 401: {
438
- message: string;
439
- };
383
+ 401: ErrorResponse;
440
384
  /**
441
385
  * Forbidden
442
386
  */
443
- 403: {
444
- message: string;
445
- };
387
+ 403: ErrorResponse;
446
388
  /**
447
389
  * Not Found
448
390
  */
449
- 404: {
450
- message: string;
451
- };
391
+ 404: ErrorResponse;
452
392
  /**
453
393
  * Internal server error
454
394
  */
455
- 500: {
456
- message: string;
457
- };
395
+ 500: ErrorResponse;
458
396
  };
459
397
  export type GetAllProductsError = GetAllProductsErrors[keyof GetAllProductsErrors];
460
398
  export type GetAllProductsResponses = {
@@ -466,104 +404,6 @@ export type GetAllProductsResponses = {
466
404
  };
467
405
  };
468
406
  export type GetAllProductsResponse = GetAllProductsResponses[keyof GetAllProductsResponses];
469
- export type GetPriceByPriceIdData = {
470
- body?: never;
471
- path: {
472
- priceId: string;
473
- };
474
- query?: never;
475
- url: '/billing/price/{priceId}';
476
- };
477
- export type GetPriceByPriceIdErrors = {
478
- /**
479
- * Bad request - Invalid parameters or malformed JSON
480
- */
481
- 400: {
482
- message: string;
483
- issues?: string;
484
- };
485
- /**
486
- * Unauthorized
487
- */
488
- 401: {
489
- message: string;
490
- };
491
- /**
492
- * Forbidden
493
- */
494
- 403: {
495
- message: string;
496
- };
497
- /**
498
- * Not Found
499
- */
500
- 404: {
501
- message: string;
502
- };
503
- /**
504
- * Internal server error
505
- */
506
- 500: {
507
- message: string;
508
- };
509
- };
510
- export type GetPriceByPriceIdError = GetPriceByPriceIdErrors[keyof GetPriceByPriceIdErrors];
511
- export type GetPriceByPriceIdResponses = {
512
- /**
513
- * Returns price details
514
- */
515
- 200: BillingPrice;
516
- };
517
- export type GetPriceByPriceIdResponse = GetPriceByPriceIdResponses[keyof GetPriceByPriceIdResponses];
518
- export type GetMaxCreditsForDefaultFreeData = {
519
- body?: never;
520
- path?: never;
521
- query?: never;
522
- url: '/billing/max-credits-for-default-free';
523
- };
524
- export type GetMaxCreditsForDefaultFreeErrors = {
525
- /**
526
- * Bad request - Invalid parameters or malformed JSON
527
- */
528
- 400: {
529
- message: string;
530
- issues?: string;
531
- };
532
- /**
533
- * Unauthorized
534
- */
535
- 401: {
536
- message: string;
537
- };
538
- /**
539
- * Forbidden
540
- */
541
- 403: {
542
- message: string;
543
- };
544
- /**
545
- * Not Found
546
- */
547
- 404: {
548
- message: string;
549
- };
550
- /**
551
- * Internal server error
552
- */
553
- 500: {
554
- message: string;
555
- };
556
- };
557
- export type GetMaxCreditsForDefaultFreeError = GetMaxCreditsForDefaultFreeErrors[keyof GetMaxCreditsForDefaultFreeErrors];
558
- export type GetMaxCreditsForDefaultFreeResponses = {
559
- /**
560
- * Returns maximum credits for free tier
561
- */
562
- 200: {
563
- maxCreditsForDefaultFree: number;
564
- };
565
- };
566
- export type GetMaxCreditsForDefaultFreeResponse = GetMaxCreditsForDefaultFreeResponses[keyof GetMaxCreditsForDefaultFreeResponses];
567
407
  export type GetCustomerInfoByDazlIdData = {
568
408
  body?: never;
569
409
  path: {
@@ -583,27 +423,19 @@ export type GetCustomerInfoByDazlIdErrors = {
583
423
  /**
584
424
  * Unauthorized
585
425
  */
586
- 401: {
587
- message: string;
588
- };
426
+ 401: ErrorResponse;
589
427
  /**
590
428
  * Forbidden
591
429
  */
592
- 403: {
593
- message: string;
594
- };
430
+ 403: ErrorResponse;
595
431
  /**
596
432
  * Not Found
597
433
  */
598
- 404: {
599
- message: string;
600
- };
434
+ 404: ErrorResponse;
601
435
  /**
602
436
  * Internal server error
603
437
  */
604
- 500: {
605
- message: string;
606
- };
438
+ 500: ErrorResponse;
607
439
  };
608
440
  export type GetCustomerInfoByDazlIdError = GetCustomerInfoByDazlIdErrors[keyof GetCustomerInfoByDazlIdErrors];
609
441
  export type GetCustomerInfoByDazlIdResponses = {
@@ -635,27 +467,19 @@ export type UpdateUserSubscriptionErrors = {
635
467
  /**
636
468
  * Unauthorized
637
469
  */
638
- 401: {
639
- message: string;
640
- };
470
+ 401: ErrorResponse;
641
471
  /**
642
472
  * Forbidden
643
473
  */
644
- 403: {
645
- message: string;
646
- };
474
+ 403: ErrorResponse;
647
475
  /**
648
476
  * Not Found
649
477
  */
650
- 404: {
651
- message: string;
652
- };
478
+ 404: ErrorResponse;
653
479
  /**
654
480
  * Internal server error
655
481
  */
656
- 500: {
657
- message: string;
658
- };
482
+ 500: ErrorResponse;
659
483
  };
660
484
  export type UpdateUserSubscriptionError = UpdateUserSubscriptionErrors[keyof UpdateUserSubscriptionErrors];
661
485
  export type UpdateUserSubscriptionResponses = {
@@ -692,27 +516,19 @@ export type CancelScheduledUpdateByDazlIdErrors = {
692
516
  /**
693
517
  * Unauthorized
694
518
  */
695
- 401: {
696
- message: string;
697
- };
519
+ 401: ErrorResponse;
698
520
  /**
699
521
  * Forbidden
700
522
  */
701
- 403: {
702
- message: string;
703
- };
523
+ 403: ErrorResponse;
704
524
  /**
705
525
  * Not Found
706
526
  */
707
- 404: {
708
- message: string;
709
- };
527
+ 404: ErrorResponse;
710
528
  /**
711
529
  * Internal server error
712
530
  */
713
- 500: {
714
- message: string;
715
- };
531
+ 500: ErrorResponse;
716
532
  };
717
533
  export type CancelScheduledUpdateByDazlIdError = CancelScheduledUpdateByDazlIdErrors[keyof CancelScheduledUpdateByDazlIdErrors];
718
534
  export type CancelScheduledUpdateByDazlIdResponses = {
@@ -744,27 +560,19 @@ export type CreateCustomerPortalSessionErrors = {
744
560
  /**
745
561
  * Unauthorized
746
562
  */
747
- 401: {
748
- message: string;
749
- };
563
+ 401: ErrorResponse;
750
564
  /**
751
565
  * Forbidden
752
566
  */
753
- 403: {
754
- message: string;
755
- };
567
+ 403: ErrorResponse;
756
568
  /**
757
569
  * Not Found
758
570
  */
759
- 404: {
760
- message: string;
761
- };
571
+ 404: ErrorResponse;
762
572
  /**
763
573
  * Internal server error
764
574
  */
765
- 500: {
766
- message: string;
767
- };
575
+ 500: ErrorResponse;
768
576
  };
769
577
  export type CreateCustomerPortalSessionError = CreateCustomerPortalSessionErrors[keyof CreateCustomerPortalSessionErrors];
770
578
  export type CreateCustomerPortalSessionResponses = {
@@ -802,27 +610,19 @@ export type CreateCustomerWithDefaultSubscriptionErrors = {
802
610
  /**
803
611
  * Unauthorized
804
612
  */
805
- 401: {
806
- message: string;
807
- };
613
+ 401: ErrorResponse;
808
614
  /**
809
615
  * Forbidden
810
616
  */
811
- 403: {
812
- message: string;
813
- };
617
+ 403: ErrorResponse;
814
618
  /**
815
619
  * Not Found
816
620
  */
817
- 404: {
818
- message: string;
819
- };
621
+ 404: ErrorResponse;
820
622
  /**
821
623
  * Internal server error
822
624
  */
823
- 500: {
824
- message: string;
825
- };
625
+ 500: ErrorResponse;
826
626
  };
827
627
  export type CreateCustomerWithDefaultSubscriptionError = CreateCustomerWithDefaultSubscriptionErrors[keyof CreateCustomerWithDefaultSubscriptionErrors];
828
628
  export type CreateCustomerWithDefaultSubscriptionResponses = {
@@ -854,27 +654,19 @@ export type GetUserInfoByDazlIdErrors = {
854
654
  /**
855
655
  * Unauthorized
856
656
  */
857
- 401: {
858
- message: string;
859
- };
657
+ 401: ErrorResponse;
860
658
  /**
861
659
  * Forbidden
862
660
  */
863
- 403: {
864
- message: string;
865
- };
661
+ 403: ErrorResponse;
866
662
  /**
867
663
  * Not Found
868
664
  */
869
- 404: {
870
- message: string;
871
- };
665
+ 404: ErrorResponse;
872
666
  /**
873
667
  * Internal server error
874
668
  */
875
- 500: {
876
- message: string;
877
- };
669
+ 500: ErrorResponse;
878
670
  };
879
671
  export type GetUserInfoByDazlIdError = GetUserInfoByDazlIdErrors[keyof GetUserInfoByDazlIdErrors];
880
672
  export type GetUserInfoByDazlIdResponses = {
@@ -889,38 +681,20 @@ export type GetUserInfoByDazlIdResponses = {
889
681
  };
890
682
  };
891
683
  export type GetUserInfoByDazlIdResponse = GetUserInfoByDazlIdResponses[keyof GetUserInfoByDazlIdResponses];
892
- export type GetUploadConfigurationData = {
684
+ export type EnsureSiteIdData = {
893
685
  body: {
894
- /**
895
- * File path within the project
896
- */
897
- path: string;
898
- /**
899
- * Project identifier
900
- */
901
686
  projectId: string;
687
+ projectName: string;
902
688
  /**
903
- * MIME type of the file to upload
904
- */
905
- mimeType?: string;
906
- /**
907
- * Access control level for the file
908
- */
909
- acl?: 'public' | 'private';
910
- /**
911
- * Callback URL to notify after upload completion
912
- */
913
- callback?: string;
914
- /**
915
- * Upload protocol to use
689
+ * Dazl ID of the project owner to verify ownership
916
690
  */
917
- protocol?: 'tus';
691
+ dazlId?: string;
918
692
  };
919
693
  path?: never;
920
694
  query?: never;
921
- url: '/media/upload-configuration';
695
+ url: '/publish/site-id';
922
696
  };
923
- export type GetUploadConfigurationErrors = {
697
+ export type EnsureSiteIdErrors = {
924
698
  /**
925
699
  * Bad request - Invalid parameters or malformed JSON
926
700
  */
@@ -931,9 +705,439 @@ export type GetUploadConfigurationErrors = {
931
705
  /**
932
706
  * Unauthorized
933
707
  */
934
- 401: {
935
- message: string;
708
+ 401: ErrorResponse;
709
+ /**
710
+ * Forbidden
711
+ */
712
+ 403: ErrorResponse;
713
+ /**
714
+ * Not Found
715
+ */
716
+ 404: ErrorResponse;
717
+ /**
718
+ * Internal server error
719
+ */
720
+ 500: ErrorResponse;
721
+ };
722
+ export type EnsureSiteIdError = EnsureSiteIdErrors[keyof EnsureSiteIdErrors];
723
+ export type EnsureSiteIdResponses = {
724
+ /**
725
+ * Returns the Netlify site ID for the given project, creates one when missing
726
+ */
727
+ 200: {
728
+ siteId: string;
729
+ };
730
+ };
731
+ export type EnsureSiteIdResponse = EnsureSiteIdResponses[keyof EnsureSiteIdResponses];
732
+ export type GetLatestDeployData = {
733
+ body?: never;
734
+ path?: never;
735
+ query: {
736
+ projectId: string;
737
+ dazlId: string;
738
+ };
739
+ url: '/publish/latest';
740
+ };
741
+ export type GetLatestDeployErrors = {
742
+ /**
743
+ * Bad request - Invalid parameters or malformed JSON
744
+ */
745
+ 400: {
746
+ message: string;
747
+ issues?: string;
748
+ };
749
+ /**
750
+ * Unauthorized
751
+ */
752
+ 401: ErrorResponse;
753
+ /**
754
+ * Forbidden
755
+ */
756
+ 403: ErrorResponse;
757
+ /**
758
+ * Not Found
759
+ */
760
+ 404: ErrorResponse;
761
+ /**
762
+ * Internal server error
763
+ */
764
+ 500: ErrorResponse;
765
+ };
766
+ export type GetLatestDeployError = GetLatestDeployErrors[keyof GetLatestDeployErrors];
767
+ export type GetLatestDeployResponses = {
768
+ /**
769
+ * Returns the latest deployment info for the given project
770
+ */
771
+ 200: Deployment;
772
+ };
773
+ export type GetLatestDeployResponse = GetLatestDeployResponses[keyof GetLatestDeployResponses];
774
+ export type UpsertDeployInDbData = {
775
+ body: {
776
+ projectId: string;
777
+ netlifyDeployId: string;
778
+ /**
779
+ * Dazl ID of the project owner to verify ownership
780
+ */
781
+ dazlId?: string;
782
+ };
783
+ path?: never;
784
+ query?: never;
785
+ url: '/publish/upsert-deploy';
786
+ };
787
+ export type UpsertDeployInDbErrors = {
788
+ /**
789
+ * Bad request - Invalid parameters or malformed JSON
790
+ */
791
+ 400: {
792
+ message: string;
793
+ issues?: string;
794
+ };
795
+ /**
796
+ * Unauthorized
797
+ */
798
+ 401: ErrorResponse;
799
+ /**
800
+ * Forbidden
801
+ */
802
+ 403: ErrorResponse;
803
+ /**
804
+ * Not Found
805
+ */
806
+ 404: ErrorResponse;
807
+ /**
808
+ * Internal server error
809
+ */
810
+ 500: ErrorResponse;
811
+ };
812
+ export type UpsertDeployInDbError = UpsertDeployInDbErrors[keyof UpsertDeployInDbErrors];
813
+ export type UpsertDeployInDbResponses = {
814
+ /**
815
+ * Successfully created or updated deployment record in the database
816
+ */
817
+ 200: Deployment;
818
+ };
819
+ export type UpsertDeployInDbResponse = UpsertDeployInDbResponses[keyof UpsertDeployInDbResponses];
820
+ export type UpdateEnvVarsData = {
821
+ body: {
822
+ siteId: string;
823
+ envVars: {
824
+ [key: string]: string;
825
+ };
826
+ };
827
+ path?: never;
828
+ query?: never;
829
+ url: '/publish/env-vars';
830
+ };
831
+ export type UpdateEnvVarsErrors = {
832
+ /**
833
+ * Bad request - Invalid parameters or malformed JSON
834
+ */
835
+ 400: {
836
+ message: string;
837
+ issues?: string;
838
+ };
839
+ /**
840
+ * Unauthorized
841
+ */
842
+ 401: ErrorResponse;
843
+ /**
844
+ * Forbidden
845
+ */
846
+ 403: ErrorResponse;
847
+ /**
848
+ * Not Found
849
+ */
850
+ 404: ErrorResponse;
851
+ /**
852
+ * Internal server error
853
+ */
854
+ 500: ErrorResponse;
855
+ };
856
+ export type UpdateEnvVarsError = UpdateEnvVarsErrors[keyof UpdateEnvVarsErrors];
857
+ export type UpdateEnvVarsResponses = {
858
+ /**
859
+ * Successfully updated environment variables
860
+ */
861
+ 200: {
862
+ success: boolean;
863
+ };
864
+ };
865
+ export type UpdateEnvVarsResponse = UpdateEnvVarsResponses[keyof UpdateEnvVarsResponses];
866
+ export type DuplicateProjectData = {
867
+ body: {
868
+ ownerDazlId: string;
869
+ /**
870
+ * Optional new name for the duplicated project
871
+ */
872
+ name?: string;
873
+ };
874
+ path: {
875
+ projectId: string;
876
+ };
877
+ query?: never;
878
+ url: '/project/duplicate/{projectId}';
879
+ };
880
+ export type DuplicateProjectErrors = {
881
+ /**
882
+ * Bad request - Invalid parameters or malformed JSON
883
+ */
884
+ 400: {
885
+ message: string;
886
+ issues?: string;
887
+ };
888
+ /**
889
+ * Unauthorized
890
+ */
891
+ 401: ErrorResponse;
892
+ /**
893
+ * Forbidden
894
+ */
895
+ 403: ErrorResponse;
896
+ /**
897
+ * Not Found
898
+ */
899
+ 404: ErrorResponse;
900
+ /**
901
+ * Internal server error
902
+ */
903
+ 500: ErrorResponse;
904
+ };
905
+ export type DuplicateProjectError = DuplicateProjectErrors[keyof DuplicateProjectErrors];
906
+ export type DuplicateProjectResponses = {
907
+ /**
908
+ * Returns the new duplicated project
909
+ */
910
+ 200: {
911
+ project: ProjectRaw;
912
+ };
913
+ };
914
+ export type DuplicateProjectResponse = DuplicateProjectResponses[keyof DuplicateProjectResponses];
915
+ export type DeleteProjectData = {
916
+ body: OwnerDazlId;
917
+ path: {
918
+ projectId: string;
919
+ };
920
+ query?: never;
921
+ url: '/project/{projectId}';
922
+ };
923
+ export type DeleteProjectErrors = {
924
+ /**
925
+ * Bad request - Invalid parameters or malformed JSON
926
+ */
927
+ 400: {
928
+ message: string;
929
+ issues?: string;
930
+ };
931
+ /**
932
+ * Unauthorized
933
+ */
934
+ 401: ErrorResponse;
935
+ /**
936
+ * Forbidden
937
+ */
938
+ 403: ErrorResponse;
939
+ /**
940
+ * Not Found
941
+ */
942
+ 404: ErrorResponse;
943
+ /**
944
+ * Internal server error
945
+ */
946
+ 500: ErrorResponse;
947
+ };
948
+ export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors];
949
+ export type DeleteProjectResponses = {
950
+ /**
951
+ * Returns the deleted project ID and confirmation message
952
+ */
953
+ 200: {
954
+ projectId: string;
955
+ };
956
+ };
957
+ export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses];
958
+ export type GetProjectByIdData = {
959
+ body?: never;
960
+ path: {
961
+ projectId: string;
962
+ };
963
+ query: {
964
+ ownerDazlId: string;
965
+ };
966
+ url: '/project/{projectId}';
967
+ };
968
+ export type GetProjectByIdErrors = {
969
+ /**
970
+ * Bad request - Invalid parameters or malformed JSON
971
+ */
972
+ 400: {
973
+ message: string;
974
+ issues?: string;
975
+ };
976
+ /**
977
+ * Unauthorized
978
+ */
979
+ 401: ErrorResponse;
980
+ /**
981
+ * Forbidden
982
+ */
983
+ 403: ErrorResponse;
984
+ /**
985
+ * Not Found
986
+ */
987
+ 404: ErrorResponse;
988
+ /**
989
+ * Internal server error
990
+ */
991
+ 500: ErrorResponse;
992
+ };
993
+ export type GetProjectByIdError = GetProjectByIdErrors[keyof GetProjectByIdErrors];
994
+ export type GetProjectByIdResponses = {
995
+ /**
996
+ * Returns the requested project
997
+ */
998
+ 200: {
999
+ project: ProjectRaw;
1000
+ };
1001
+ };
1002
+ export type GetProjectByIdResponse = GetProjectByIdResponses[keyof GetProjectByIdResponses];
1003
+ export type UpdateProjectData = {
1004
+ body: {
1005
+ name?: string;
1006
+ lastOpenedAt?: string | null;
1007
+ latestScreenshot?: string | null;
1008
+ archivedAt?: string | null;
1009
+ ownerDazlId: string;
1010
+ };
1011
+ path: {
1012
+ projectId: string;
1013
+ };
1014
+ query?: never;
1015
+ url: '/project/{projectId}';
1016
+ };
1017
+ export type UpdateProjectErrors = {
1018
+ /**
1019
+ * Bad request - Invalid parameters or malformed JSON
1020
+ */
1021
+ 400: {
1022
+ message: string;
1023
+ issues?: string;
1024
+ };
1025
+ /**
1026
+ * Unauthorized
1027
+ */
1028
+ 401: ErrorResponse;
1029
+ /**
1030
+ * Forbidden
1031
+ */
1032
+ 403: ErrorResponse;
1033
+ /**
1034
+ * Not Found
1035
+ */
1036
+ 404: ErrorResponse;
1037
+ /**
1038
+ * Internal server error
1039
+ */
1040
+ 500: ErrorResponse;
1041
+ };
1042
+ export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];
1043
+ export type UpdateProjectResponses = {
1044
+ /**
1045
+ * Returns the updated project
1046
+ */
1047
+ 200: {
1048
+ project: ProjectRaw;
1049
+ };
1050
+ };
1051
+ export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
1052
+ export type CreateProjectData = {
1053
+ body: {
1054
+ name: string;
1055
+ userDazlId: string;
1056
+ latestScreenshot?: string | null;
1057
+ originTemplateId?: string | null;
936
1058
  };
1059
+ path?: never;
1060
+ query?: never;
1061
+ url: '/project';
1062
+ };
1063
+ export type CreateProjectErrors = {
1064
+ /**
1065
+ * Bad request - Invalid parameters or malformed JSON
1066
+ */
1067
+ 400: {
1068
+ message: string;
1069
+ issues?: string;
1070
+ };
1071
+ /**
1072
+ * Unauthorized
1073
+ */
1074
+ 401: ErrorResponse;
1075
+ /**
1076
+ * Forbidden
1077
+ */
1078
+ 403: ErrorResponse;
1079
+ /**
1080
+ * Not Found
1081
+ */
1082
+ 404: ErrorResponse;
1083
+ /**
1084
+ * Internal server error
1085
+ */
1086
+ 500: ErrorResponse;
1087
+ };
1088
+ export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors];
1089
+ export type CreateProjectResponses = {
1090
+ /**
1091
+ * Returns the created project
1092
+ */
1093
+ 200: {
1094
+ project: ProjectRaw;
1095
+ };
1096
+ };
1097
+ export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];
1098
+ export type GetUploadConfigurationData = {
1099
+ body: {
1100
+ /**
1101
+ * File path within the project
1102
+ */
1103
+ path: string;
1104
+ /**
1105
+ * Project identifier
1106
+ */
1107
+ projectId: string;
1108
+ /**
1109
+ * MIME type of the file to upload
1110
+ */
1111
+ mimeType?: string;
1112
+ /**
1113
+ * Access control level for the file
1114
+ */
1115
+ acl?: 'public' | 'private';
1116
+ /**
1117
+ * Callback URL to notify after upload completion
1118
+ */
1119
+ callback?: string;
1120
+ /**
1121
+ * Upload protocol to use
1122
+ */
1123
+ protocol?: 'tus';
1124
+ };
1125
+ path?: never;
1126
+ query?: never;
1127
+ url: '/media/upload-configuration';
1128
+ };
1129
+ export type GetUploadConfigurationErrors = {
1130
+ /**
1131
+ * Bad request - Invalid parameters or malformed JSON
1132
+ */
1133
+ 400: {
1134
+ message: string;
1135
+ issues?: string;
1136
+ };
1137
+ /**
1138
+ * Unauthorized
1139
+ */
1140
+ 401: ErrorResponse;
937
1141
  /**
938
1142
  * Forbidden - Permission denied
939
1143
  */
@@ -949,9 +1153,7 @@ export type GetUploadConfigurationErrors = {
949
1153
  /**
950
1154
  * Internal server error
951
1155
  */
952
- 500: {
953
- message: string;
954
- };
1156
+ 500: ErrorResponse;
955
1157
  };
956
1158
  export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
957
1159
  export type GetUploadConfigurationResponses = {
@@ -1007,9 +1209,7 @@ export type ListFilesErrors = {
1007
1209
  /**
1008
1210
  * Unauthorized
1009
1211
  */
1010
- 401: {
1011
- message: string;
1012
- };
1212
+ 401: ErrorResponse;
1013
1213
  /**
1014
1214
  * Forbidden - Permission denied
1015
1215
  */
@@ -1025,9 +1225,7 @@ export type ListFilesErrors = {
1025
1225
  /**
1026
1226
  * Internal server error
1027
1227
  */
1028
- 500: {
1029
- message: string;
1030
- };
1228
+ 500: ErrorResponse;
1031
1229
  };
1032
1230
  export type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
1033
1231
  export type ListFilesResponses = {
@@ -1085,9 +1283,7 @@ export type CreateMediaErrors = {
1085
1283
  /**
1086
1284
  * Unauthorized
1087
1285
  */
1088
- 401: {
1089
- message: string;
1090
- };
1286
+ 401: ErrorResponse;
1091
1287
  /**
1092
1288
  * Forbidden - Permission denied
1093
1289
  */
@@ -1103,9 +1299,7 @@ export type CreateMediaErrors = {
1103
1299
  /**
1104
1300
  * Internal server error
1105
1301
  */
1106
- 500: {
1107
- message: string;
1108
- };
1302
+ 500: ErrorResponse;
1109
1303
  };
1110
1304
  export type CreateMediaError = CreateMediaErrors[keyof CreateMediaErrors];
1111
1305
  export type CreateMediaResponses = {
@@ -1136,9 +1330,7 @@ export type GetAccountScreenshotsErrors = {
1136
1330
  /**
1137
1331
  * Unauthorized
1138
1332
  */
1139
- 401: {
1140
- message: string;
1141
- };
1333
+ 401: ErrorResponse;
1142
1334
  /**
1143
1335
  * Forbidden - Permission denied
1144
1336
  */
@@ -1154,9 +1346,7 @@ export type GetAccountScreenshotsErrors = {
1154
1346
  /**
1155
1347
  * Internal server error
1156
1348
  */
1157
- 500: {
1158
- message: string;
1159
- };
1349
+ 500: ErrorResponse;
1160
1350
  };
1161
1351
  export type GetAccountScreenshotsError = GetAccountScreenshotsErrors[keyof GetAccountScreenshotsErrors];
1162
1352
  export type GetAccountScreenshotsResponses = {
@@ -1192,9 +1382,7 @@ export type GetProjectScreenshotsErrors = {
1192
1382
  /**
1193
1383
  * Unauthorized
1194
1384
  */
1195
- 401: {
1196
- message: string;
1197
- };
1385
+ 401: ErrorResponse;
1198
1386
  /**
1199
1387
  * Forbidden - Permission denied
1200
1388
  */
@@ -1210,9 +1398,7 @@ export type GetProjectScreenshotsErrors = {
1210
1398
  /**
1211
1399
  * Internal server error
1212
1400
  */
1213
- 500: {
1214
- message: string;
1215
- };
1401
+ 500: ErrorResponse;
1216
1402
  };
1217
1403
  export type GetProjectScreenshotsError = GetProjectScreenshotsErrors[keyof GetProjectScreenshotsErrors];
1218
1404
  export type GetProjectScreenshotsResponses = {
@@ -1272,9 +1458,7 @@ export type TakeScreenshotErrors = {
1272
1458
  /**
1273
1459
  * Unauthorized
1274
1460
  */
1275
- 401: {
1276
- message: string;
1277
- };
1461
+ 401: ErrorResponse;
1278
1462
  /**
1279
1463
  * Forbidden - Permission denied
1280
1464
  */
@@ -1290,9 +1474,7 @@ export type TakeScreenshotErrors = {
1290
1474
  /**
1291
1475
  * Internal server error
1292
1476
  */
1293
- 500: {
1294
- message: string;
1295
- };
1477
+ 500: ErrorResponse;
1296
1478
  };
1297
1479
  export type TakeScreenshotError = TakeScreenshotErrors[keyof TakeScreenshotErrors];
1298
1480
  export type TakeScreenshotResponses = {
@@ -1344,4 +1526,132 @@ export type TakeScreenshotResponses = {
1344
1526
  };
1345
1527
  };
1346
1528
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1529
+ export type ScrapePageContentData = {
1530
+ body: {
1531
+ /**
1532
+ * URL of the page to scrape
1533
+ */
1534
+ url: string;
1535
+ /**
1536
+ * Only return the main content of the page excluding headers, navs, footers, etc.
1537
+ */
1538
+ onlyMainContent?: boolean;
1539
+ /**
1540
+ * Emulate scraping from a mobile device
1541
+ */
1542
+ mobile?: boolean;
1543
+ /**
1544
+ * Fetch external CSS stylesheets and inline them as <style> tags for fully self-contained HTML
1545
+ */
1546
+ inlineExternalCss?: boolean;
1547
+ /**
1548
+ * Include structured branding/design system data (colors, fonts, typography, spacing, components)
1549
+ */
1550
+ includeBranding?: boolean;
1551
+ };
1552
+ path?: never;
1553
+ query?: never;
1554
+ url: '/capture/scrape';
1555
+ };
1556
+ export type ScrapePageContentErrors = {
1557
+ /**
1558
+ * Bad request - Invalid parameters or malformed JSON
1559
+ */
1560
+ 400: {
1561
+ message: string;
1562
+ issues?: string;
1563
+ };
1564
+ /**
1565
+ * Unauthorized
1566
+ */
1567
+ 401: ErrorResponse;
1568
+ /**
1569
+ * Forbidden - Permission denied
1570
+ */
1571
+ 403: {
1572
+ message: string;
1573
+ };
1574
+ /**
1575
+ * Not found
1576
+ */
1577
+ 404: {
1578
+ message: string;
1579
+ };
1580
+ /**
1581
+ * Internal server error
1582
+ */
1583
+ 500: ErrorResponse;
1584
+ };
1585
+ export type ScrapePageContentError = ScrapePageContentErrors[keyof ScrapePageContentErrors];
1586
+ export type ScrapePageContentResponses = {
1587
+ /**
1588
+ * Page content scraped successfully
1589
+ */
1590
+ 200: {
1591
+ /**
1592
+ * Whether the operation succeeded
1593
+ */
1594
+ success: boolean;
1595
+ /**
1596
+ * Cleaned HTML content of the page (processed for readability)
1597
+ */
1598
+ html: string;
1599
+ /**
1600
+ * Raw HTML content of the page as-is
1601
+ */
1602
+ rawHtml: string;
1603
+ /**
1604
+ * Page metadata
1605
+ */
1606
+ metadata?: {
1607
+ title?: string;
1608
+ description?: string;
1609
+ language?: string;
1610
+ sourceURL?: string;
1611
+ keywords?: string;
1612
+ ogLocaleAlternate?: Array<string>;
1613
+ statusCode: number;
1614
+ error?: string;
1615
+ };
1616
+ /**
1617
+ * Structured branding/design system data (when includeBranding is true)
1618
+ */
1619
+ branding?: {
1620
+ colorScheme?: 'light' | 'dark' | null;
1621
+ logo?: string | null;
1622
+ colors?: {
1623
+ [key: string]: unknown;
1624
+ } | null;
1625
+ fonts?: Array<{
1626
+ [key: string]: unknown;
1627
+ }> | null;
1628
+ typography?: {
1629
+ [key: string]: unknown;
1630
+ } | null;
1631
+ spacing?: {
1632
+ [key: string]: unknown;
1633
+ } | null;
1634
+ components?: {
1635
+ [key: string]: unknown;
1636
+ } | null;
1637
+ images?: {
1638
+ [key: string]: unknown;
1639
+ } | null;
1640
+ [key: string]: unknown | 'light' | 'dark' | null | string | null | {
1641
+ [key: string]: unknown;
1642
+ } | null | Array<{
1643
+ [key: string]: unknown;
1644
+ }> | null | {
1645
+ [key: string]: unknown;
1646
+ } | null | {
1647
+ [key: string]: unknown;
1648
+ } | null | {
1649
+ [key: string]: unknown;
1650
+ } | null | {
1651
+ [key: string]: unknown;
1652
+ } | null | undefined;
1653
+ };
1654
+ };
1655
+ };
1656
+ export type ScrapePageContentResponse = ScrapePageContentResponses[keyof ScrapePageContentResponses];
1347
1657
  //# sourceMappingURL=types.gen.d.ts.map