@dazl/internal-api-client 1.3.1 → 1.3.2

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 = {
@@ -331,27 +339,19 @@ export type GetBalanceByDazlIdErrors = {
331
339
  /**
332
340
  * Unauthorized
333
341
  */
334
- 401: {
335
- message: string;
336
- };
342
+ 401: ErrorResponse;
337
343
  /**
338
344
  * Forbidden
339
345
  */
340
- 403: {
341
- message: string;
342
- };
346
+ 403: ErrorResponse;
343
347
  /**
344
348
  * Not Found
345
349
  */
346
- 404: {
347
- message: string;
348
- };
350
+ 404: ErrorResponse;
349
351
  /**
350
352
  * Internal server error
351
353
  */
352
- 500: {
353
- message: string;
354
- };
354
+ 500: ErrorResponse;
355
355
  };
356
356
  export type GetBalanceByDazlIdError = GetBalanceByDazlIdErrors[keyof GetBalanceByDazlIdErrors];
357
357
  export type GetBalanceByDazlIdResponses = {
@@ -385,27 +385,19 @@ export type GetHasSufficientCreditsByDazlIdErrors = {
385
385
  /**
386
386
  * Unauthorized
387
387
  */
388
- 401: {
389
- message: string;
390
- };
388
+ 401: ErrorResponse;
391
389
  /**
392
390
  * Forbidden
393
391
  */
394
- 403: {
395
- message: string;
396
- };
392
+ 403: ErrorResponse;
397
393
  /**
398
394
  * Not Found
399
395
  */
400
- 404: {
401
- message: string;
402
- };
396
+ 404: ErrorResponse;
403
397
  /**
404
398
  * Internal server error
405
399
  */
406
- 500: {
407
- message: string;
408
- };
400
+ 500: ErrorResponse;
409
401
  };
410
402
  export type GetHasSufficientCreditsByDazlIdError = GetHasSufficientCreditsByDazlIdErrors[keyof GetHasSufficientCreditsByDazlIdErrors];
411
403
  export type GetHasSufficientCreditsByDazlIdResponses = {
@@ -434,27 +426,19 @@ export type GetAllProductsErrors = {
434
426
  /**
435
427
  * Unauthorized
436
428
  */
437
- 401: {
438
- message: string;
439
- };
429
+ 401: ErrorResponse;
440
430
  /**
441
431
  * Forbidden
442
432
  */
443
- 403: {
444
- message: string;
445
- };
433
+ 403: ErrorResponse;
446
434
  /**
447
435
  * Not Found
448
436
  */
449
- 404: {
450
- message: string;
451
- };
437
+ 404: ErrorResponse;
452
438
  /**
453
439
  * Internal server error
454
440
  */
455
- 500: {
456
- message: string;
457
- };
441
+ 500: ErrorResponse;
458
442
  };
459
443
  export type GetAllProductsError = GetAllProductsErrors[keyof GetAllProductsErrors];
460
444
  export type GetAllProductsResponses = {
@@ -485,27 +469,19 @@ export type GetPriceByPriceIdErrors = {
485
469
  /**
486
470
  * Unauthorized
487
471
  */
488
- 401: {
489
- message: string;
490
- };
472
+ 401: ErrorResponse;
491
473
  /**
492
474
  * Forbidden
493
475
  */
494
- 403: {
495
- message: string;
496
- };
476
+ 403: ErrorResponse;
497
477
  /**
498
478
  * Not Found
499
479
  */
500
- 404: {
501
- message: string;
502
- };
480
+ 404: ErrorResponse;
503
481
  /**
504
482
  * Internal server error
505
483
  */
506
- 500: {
507
- message: string;
508
- };
484
+ 500: ErrorResponse;
509
485
  };
510
486
  export type GetPriceByPriceIdError = GetPriceByPriceIdErrors[keyof GetPriceByPriceIdErrors];
511
487
  export type GetPriceByPriceIdResponses = {
@@ -532,27 +508,19 @@ export type GetMaxCreditsForDefaultFreeErrors = {
532
508
  /**
533
509
  * Unauthorized
534
510
  */
535
- 401: {
536
- message: string;
537
- };
511
+ 401: ErrorResponse;
538
512
  /**
539
513
  * Forbidden
540
514
  */
541
- 403: {
542
- message: string;
543
- };
515
+ 403: ErrorResponse;
544
516
  /**
545
517
  * Not Found
546
518
  */
547
- 404: {
548
- message: string;
549
- };
519
+ 404: ErrorResponse;
550
520
  /**
551
521
  * Internal server error
552
522
  */
553
- 500: {
554
- message: string;
555
- };
523
+ 500: ErrorResponse;
556
524
  };
557
525
  export type GetMaxCreditsForDefaultFreeError = GetMaxCreditsForDefaultFreeErrors[keyof GetMaxCreditsForDefaultFreeErrors];
558
526
  export type GetMaxCreditsForDefaultFreeResponses = {
@@ -583,27 +551,19 @@ export type GetCustomerInfoByDazlIdErrors = {
583
551
  /**
584
552
  * Unauthorized
585
553
  */
586
- 401: {
587
- message: string;
588
- };
554
+ 401: ErrorResponse;
589
555
  /**
590
556
  * Forbidden
591
557
  */
592
- 403: {
593
- message: string;
594
- };
558
+ 403: ErrorResponse;
595
559
  /**
596
560
  * Not Found
597
561
  */
598
- 404: {
599
- message: string;
600
- };
562
+ 404: ErrorResponse;
601
563
  /**
602
564
  * Internal server error
603
565
  */
604
- 500: {
605
- message: string;
606
- };
566
+ 500: ErrorResponse;
607
567
  };
608
568
  export type GetCustomerInfoByDazlIdError = GetCustomerInfoByDazlIdErrors[keyof GetCustomerInfoByDazlIdErrors];
609
569
  export type GetCustomerInfoByDazlIdResponses = {
@@ -635,27 +595,19 @@ export type UpdateUserSubscriptionErrors = {
635
595
  /**
636
596
  * Unauthorized
637
597
  */
638
- 401: {
639
- message: string;
640
- };
598
+ 401: ErrorResponse;
641
599
  /**
642
600
  * Forbidden
643
601
  */
644
- 403: {
645
- message: string;
646
- };
602
+ 403: ErrorResponse;
647
603
  /**
648
604
  * Not Found
649
605
  */
650
- 404: {
651
- message: string;
652
- };
606
+ 404: ErrorResponse;
653
607
  /**
654
608
  * Internal server error
655
609
  */
656
- 500: {
657
- message: string;
658
- };
610
+ 500: ErrorResponse;
659
611
  };
660
612
  export type UpdateUserSubscriptionError = UpdateUserSubscriptionErrors[keyof UpdateUserSubscriptionErrors];
661
613
  export type UpdateUserSubscriptionResponses = {
@@ -692,27 +644,19 @@ export type CancelScheduledUpdateByDazlIdErrors = {
692
644
  /**
693
645
  * Unauthorized
694
646
  */
695
- 401: {
696
- message: string;
697
- };
647
+ 401: ErrorResponse;
698
648
  /**
699
649
  * Forbidden
700
650
  */
701
- 403: {
702
- message: string;
703
- };
651
+ 403: ErrorResponse;
704
652
  /**
705
653
  * Not Found
706
654
  */
707
- 404: {
708
- message: string;
709
- };
655
+ 404: ErrorResponse;
710
656
  /**
711
657
  * Internal server error
712
658
  */
713
- 500: {
714
- message: string;
715
- };
659
+ 500: ErrorResponse;
716
660
  };
717
661
  export type CancelScheduledUpdateByDazlIdError = CancelScheduledUpdateByDazlIdErrors[keyof CancelScheduledUpdateByDazlIdErrors];
718
662
  export type CancelScheduledUpdateByDazlIdResponses = {
@@ -744,27 +688,19 @@ export type CreateCustomerPortalSessionErrors = {
744
688
  /**
745
689
  * Unauthorized
746
690
  */
747
- 401: {
748
- message: string;
749
- };
691
+ 401: ErrorResponse;
750
692
  /**
751
693
  * Forbidden
752
694
  */
753
- 403: {
754
- message: string;
755
- };
695
+ 403: ErrorResponse;
756
696
  /**
757
697
  * Not Found
758
698
  */
759
- 404: {
760
- message: string;
761
- };
699
+ 404: ErrorResponse;
762
700
  /**
763
701
  * Internal server error
764
702
  */
765
- 500: {
766
- message: string;
767
- };
703
+ 500: ErrorResponse;
768
704
  };
769
705
  export type CreateCustomerPortalSessionError = CreateCustomerPortalSessionErrors[keyof CreateCustomerPortalSessionErrors];
770
706
  export type CreateCustomerPortalSessionResponses = {
@@ -802,27 +738,19 @@ export type CreateCustomerWithDefaultSubscriptionErrors = {
802
738
  /**
803
739
  * Unauthorized
804
740
  */
805
- 401: {
806
- message: string;
807
- };
741
+ 401: ErrorResponse;
808
742
  /**
809
743
  * Forbidden
810
744
  */
811
- 403: {
812
- message: string;
813
- };
745
+ 403: ErrorResponse;
814
746
  /**
815
747
  * Not Found
816
748
  */
817
- 404: {
818
- message: string;
819
- };
749
+ 404: ErrorResponse;
820
750
  /**
821
751
  * Internal server error
822
752
  */
823
- 500: {
824
- message: string;
825
- };
753
+ 500: ErrorResponse;
826
754
  };
827
755
  export type CreateCustomerWithDefaultSubscriptionError = CreateCustomerWithDefaultSubscriptionErrors[keyof CreateCustomerWithDefaultSubscriptionErrors];
828
756
  export type CreateCustomerWithDefaultSubscriptionResponses = {
@@ -854,27 +782,19 @@ export type GetUserInfoByDazlIdErrors = {
854
782
  /**
855
783
  * Unauthorized
856
784
  */
857
- 401: {
858
- message: string;
859
- };
785
+ 401: ErrorResponse;
860
786
  /**
861
787
  * Forbidden
862
788
  */
863
- 403: {
864
- message: string;
865
- };
789
+ 403: ErrorResponse;
866
790
  /**
867
791
  * Not Found
868
792
  */
869
- 404: {
870
- message: string;
871
- };
793
+ 404: ErrorResponse;
872
794
  /**
873
795
  * Internal server error
874
796
  */
875
- 500: {
876
- message: string;
877
- };
797
+ 500: ErrorResponse;
878
798
  };
879
799
  export type GetUserInfoByDazlIdError = GetUserInfoByDazlIdErrors[keyof GetUserInfoByDazlIdErrors];
880
800
  export type GetUserInfoByDazlIdResponses = {
@@ -889,6 +809,368 @@ export type GetUserInfoByDazlIdResponses = {
889
809
  };
890
810
  };
891
811
  export type GetUserInfoByDazlIdResponse = GetUserInfoByDazlIdResponses[keyof GetUserInfoByDazlIdResponses];
812
+ export type EnsureSiteIdData = {
813
+ body: {
814
+ projectId: string;
815
+ projectName: string;
816
+ /**
817
+ * Dazl ID of the project owner to verify ownership
818
+ */
819
+ dazlId?: string;
820
+ };
821
+ path?: never;
822
+ query?: never;
823
+ url: '/publish/site-id';
824
+ };
825
+ export type EnsureSiteIdErrors = {
826
+ /**
827
+ * Bad request - Invalid parameters or malformed JSON
828
+ */
829
+ 400: {
830
+ message: string;
831
+ issues?: string;
832
+ };
833
+ /**
834
+ * Unauthorized
835
+ */
836
+ 401: ErrorResponse;
837
+ /**
838
+ * Forbidden
839
+ */
840
+ 403: ErrorResponse;
841
+ /**
842
+ * Not Found
843
+ */
844
+ 404: ErrorResponse;
845
+ /**
846
+ * Internal server error
847
+ */
848
+ 500: ErrorResponse;
849
+ };
850
+ export type EnsureSiteIdError = EnsureSiteIdErrors[keyof EnsureSiteIdErrors];
851
+ export type EnsureSiteIdResponses = {
852
+ /**
853
+ * Returns the Netlify site ID for the given project, creates one when missing
854
+ */
855
+ 200: {
856
+ siteId: string;
857
+ };
858
+ };
859
+ export type EnsureSiteIdResponse = EnsureSiteIdResponses[keyof EnsureSiteIdResponses];
860
+ export type GetLatestDeployData = {
861
+ body?: never;
862
+ path?: never;
863
+ query: {
864
+ projectId: string;
865
+ dazlId: string;
866
+ };
867
+ url: '/publish/latest';
868
+ };
869
+ export type GetLatestDeployErrors = {
870
+ /**
871
+ * Bad request - Invalid parameters or malformed JSON
872
+ */
873
+ 400: {
874
+ message: string;
875
+ issues?: string;
876
+ };
877
+ /**
878
+ * Unauthorized
879
+ */
880
+ 401: ErrorResponse;
881
+ /**
882
+ * Forbidden
883
+ */
884
+ 403: ErrorResponse;
885
+ /**
886
+ * Not Found
887
+ */
888
+ 404: ErrorResponse;
889
+ /**
890
+ * Internal server error
891
+ */
892
+ 500: ErrorResponse;
893
+ };
894
+ export type GetLatestDeployError = GetLatestDeployErrors[keyof GetLatestDeployErrors];
895
+ export type GetLatestDeployResponses = {
896
+ /**
897
+ * Returns the latest deployment info for the given project
898
+ */
899
+ 200: Deployment;
900
+ };
901
+ export type GetLatestDeployResponse = GetLatestDeployResponses[keyof GetLatestDeployResponses];
902
+ export type UpsertDeployInDbData = {
903
+ body: {
904
+ projectId: string;
905
+ netlifyDeployId: string;
906
+ /**
907
+ * Dazl ID of the project owner to verify ownership
908
+ */
909
+ dazlId?: string;
910
+ };
911
+ path?: never;
912
+ query?: never;
913
+ url: '/publish/upsert-deploy';
914
+ };
915
+ export type UpsertDeployInDbErrors = {
916
+ /**
917
+ * Bad request - Invalid parameters or malformed JSON
918
+ */
919
+ 400: {
920
+ message: string;
921
+ issues?: string;
922
+ };
923
+ /**
924
+ * Unauthorized
925
+ */
926
+ 401: ErrorResponse;
927
+ /**
928
+ * Forbidden
929
+ */
930
+ 403: ErrorResponse;
931
+ /**
932
+ * Not Found
933
+ */
934
+ 404: ErrorResponse;
935
+ /**
936
+ * Internal server error
937
+ */
938
+ 500: ErrorResponse;
939
+ };
940
+ export type UpsertDeployInDbError = UpsertDeployInDbErrors[keyof UpsertDeployInDbErrors];
941
+ export type UpsertDeployInDbResponses = {
942
+ /**
943
+ * Successfully created or updated deployment record in the database
944
+ */
945
+ 200: Deployment;
946
+ };
947
+ export type UpsertDeployInDbResponse = UpsertDeployInDbResponses[keyof UpsertDeployInDbResponses];
948
+ export type UpdateEnvVarsData = {
949
+ body: {
950
+ siteId: string;
951
+ envVars: {
952
+ [key: string]: string;
953
+ };
954
+ };
955
+ path?: never;
956
+ query?: never;
957
+ url: '/publish/env-vars';
958
+ };
959
+ export type UpdateEnvVarsErrors = {
960
+ /**
961
+ * Bad request - Invalid parameters or malformed JSON
962
+ */
963
+ 400: {
964
+ message: string;
965
+ issues?: string;
966
+ };
967
+ /**
968
+ * Unauthorized
969
+ */
970
+ 401: ErrorResponse;
971
+ /**
972
+ * Forbidden
973
+ */
974
+ 403: ErrorResponse;
975
+ /**
976
+ * Not Found
977
+ */
978
+ 404: ErrorResponse;
979
+ /**
980
+ * Internal server error
981
+ */
982
+ 500: ErrorResponse;
983
+ };
984
+ export type UpdateEnvVarsError = UpdateEnvVarsErrors[keyof UpdateEnvVarsErrors];
985
+ export type UpdateEnvVarsResponses = {
986
+ /**
987
+ * Successfully updated environment variables
988
+ */
989
+ 200: {
990
+ success: boolean;
991
+ };
992
+ };
993
+ export type UpdateEnvVarsResponse = UpdateEnvVarsResponses[keyof UpdateEnvVarsResponses];
994
+ export type DuplicateProjectData = {
995
+ body: OwnerDazlId;
996
+ path: {
997
+ projectId: string;
998
+ };
999
+ query?: never;
1000
+ url: '/project/duplicate/{projectId}';
1001
+ };
1002
+ export type DuplicateProjectErrors = {
1003
+ /**
1004
+ * Bad request - Invalid parameters or malformed JSON
1005
+ */
1006
+ 400: {
1007
+ message: string;
1008
+ issues?: string;
1009
+ };
1010
+ /**
1011
+ * Unauthorized
1012
+ */
1013
+ 401: ErrorResponse;
1014
+ /**
1015
+ * Forbidden
1016
+ */
1017
+ 403: ErrorResponse;
1018
+ /**
1019
+ * Not Found
1020
+ */
1021
+ 404: ErrorResponse;
1022
+ /**
1023
+ * Internal server error
1024
+ */
1025
+ 500: ErrorResponse;
1026
+ };
1027
+ export type DuplicateProjectError = DuplicateProjectErrors[keyof DuplicateProjectErrors];
1028
+ export type DuplicateProjectResponses = {
1029
+ /**
1030
+ * Returns the new duplicated project
1031
+ */
1032
+ 200: {
1033
+ project: ProjectRaw;
1034
+ };
1035
+ };
1036
+ export type DuplicateProjectResponse = DuplicateProjectResponses[keyof DuplicateProjectResponses];
1037
+ export type DeleteProjectData = {
1038
+ body: OwnerDazlId;
1039
+ path: {
1040
+ projectId: string;
1041
+ };
1042
+ query?: never;
1043
+ url: '/project/{projectId}';
1044
+ };
1045
+ export type DeleteProjectErrors = {
1046
+ /**
1047
+ * Bad request - Invalid parameters or malformed JSON
1048
+ */
1049
+ 400: {
1050
+ message: string;
1051
+ issues?: string;
1052
+ };
1053
+ /**
1054
+ * Unauthorized
1055
+ */
1056
+ 401: ErrorResponse;
1057
+ /**
1058
+ * Forbidden
1059
+ */
1060
+ 403: ErrorResponse;
1061
+ /**
1062
+ * Not Found
1063
+ */
1064
+ 404: ErrorResponse;
1065
+ /**
1066
+ * Internal server error
1067
+ */
1068
+ 500: ErrorResponse;
1069
+ };
1070
+ export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors];
1071
+ export type DeleteProjectResponses = {
1072
+ /**
1073
+ * Returns the deleted project ID and confirmation message
1074
+ */
1075
+ 200: {
1076
+ projectId: string;
1077
+ };
1078
+ };
1079
+ export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses];
1080
+ export type GetProjectByIdData = {
1081
+ body?: never;
1082
+ path: {
1083
+ projectId: string;
1084
+ };
1085
+ query: {
1086
+ ownerDazlId: string;
1087
+ };
1088
+ url: '/project/{projectId}';
1089
+ };
1090
+ export type GetProjectByIdErrors = {
1091
+ /**
1092
+ * Bad request - Invalid parameters or malformed JSON
1093
+ */
1094
+ 400: {
1095
+ message: string;
1096
+ issues?: string;
1097
+ };
1098
+ /**
1099
+ * Unauthorized
1100
+ */
1101
+ 401: ErrorResponse;
1102
+ /**
1103
+ * Forbidden
1104
+ */
1105
+ 403: ErrorResponse;
1106
+ /**
1107
+ * Not Found
1108
+ */
1109
+ 404: ErrorResponse;
1110
+ /**
1111
+ * Internal server error
1112
+ */
1113
+ 500: ErrorResponse;
1114
+ };
1115
+ export type GetProjectByIdError = GetProjectByIdErrors[keyof GetProjectByIdErrors];
1116
+ export type GetProjectByIdResponses = {
1117
+ /**
1118
+ * Returns the requested project
1119
+ */
1120
+ 200: {
1121
+ project: ProjectRaw;
1122
+ };
1123
+ };
1124
+ export type GetProjectByIdResponse = GetProjectByIdResponses[keyof GetProjectByIdResponses];
1125
+ export type UpdateProjectData = {
1126
+ body: {
1127
+ name?: string;
1128
+ lastOpenedAt?: string | null;
1129
+ latestScreenshot?: string | null;
1130
+ archivedAt?: string | null;
1131
+ ownerDazlId: string;
1132
+ };
1133
+ path: {
1134
+ projectId: string;
1135
+ };
1136
+ query?: never;
1137
+ url: '/project/{projectId}';
1138
+ };
1139
+ export type UpdateProjectErrors = {
1140
+ /**
1141
+ * Bad request - Invalid parameters or malformed JSON
1142
+ */
1143
+ 400: {
1144
+ message: string;
1145
+ issues?: string;
1146
+ };
1147
+ /**
1148
+ * Unauthorized
1149
+ */
1150
+ 401: ErrorResponse;
1151
+ /**
1152
+ * Forbidden
1153
+ */
1154
+ 403: ErrorResponse;
1155
+ /**
1156
+ * Not Found
1157
+ */
1158
+ 404: ErrorResponse;
1159
+ /**
1160
+ * Internal server error
1161
+ */
1162
+ 500: ErrorResponse;
1163
+ };
1164
+ export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];
1165
+ export type UpdateProjectResponses = {
1166
+ /**
1167
+ * Returns the updated project
1168
+ */
1169
+ 200: {
1170
+ project: ProjectRaw;
1171
+ };
1172
+ };
1173
+ export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
892
1174
  export type GetUploadConfigurationData = {
893
1175
  body: {
894
1176
  /**
@@ -931,9 +1213,7 @@ export type GetUploadConfigurationErrors = {
931
1213
  /**
932
1214
  * Unauthorized
933
1215
  */
934
- 401: {
935
- message: string;
936
- };
1216
+ 401: ErrorResponse;
937
1217
  /**
938
1218
  * Forbidden - Permission denied
939
1219
  */
@@ -949,9 +1229,7 @@ export type GetUploadConfigurationErrors = {
949
1229
  /**
950
1230
  * Internal server error
951
1231
  */
952
- 500: {
953
- message: string;
954
- };
1232
+ 500: ErrorResponse;
955
1233
  };
956
1234
  export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
957
1235
  export type GetUploadConfigurationResponses = {
@@ -1007,9 +1285,7 @@ export type ListFilesErrors = {
1007
1285
  /**
1008
1286
  * Unauthorized
1009
1287
  */
1010
- 401: {
1011
- message: string;
1012
- };
1288
+ 401: ErrorResponse;
1013
1289
  /**
1014
1290
  * Forbidden - Permission denied
1015
1291
  */
@@ -1025,9 +1301,7 @@ export type ListFilesErrors = {
1025
1301
  /**
1026
1302
  * Internal server error
1027
1303
  */
1028
- 500: {
1029
- message: string;
1030
- };
1304
+ 500: ErrorResponse;
1031
1305
  };
1032
1306
  export type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
1033
1307
  export type ListFilesResponses = {
@@ -1085,9 +1359,7 @@ export type CreateMediaErrors = {
1085
1359
  /**
1086
1360
  * Unauthorized
1087
1361
  */
1088
- 401: {
1089
- message: string;
1090
- };
1362
+ 401: ErrorResponse;
1091
1363
  /**
1092
1364
  * Forbidden - Permission denied
1093
1365
  */
@@ -1103,9 +1375,7 @@ export type CreateMediaErrors = {
1103
1375
  /**
1104
1376
  * Internal server error
1105
1377
  */
1106
- 500: {
1107
- message: string;
1108
- };
1378
+ 500: ErrorResponse;
1109
1379
  };
1110
1380
  export type CreateMediaError = CreateMediaErrors[keyof CreateMediaErrors];
1111
1381
  export type CreateMediaResponses = {
@@ -1136,9 +1406,7 @@ export type GetAccountScreenshotsErrors = {
1136
1406
  /**
1137
1407
  * Unauthorized
1138
1408
  */
1139
- 401: {
1140
- message: string;
1141
- };
1409
+ 401: ErrorResponse;
1142
1410
  /**
1143
1411
  * Forbidden - Permission denied
1144
1412
  */
@@ -1154,9 +1422,7 @@ export type GetAccountScreenshotsErrors = {
1154
1422
  /**
1155
1423
  * Internal server error
1156
1424
  */
1157
- 500: {
1158
- message: string;
1159
- };
1425
+ 500: ErrorResponse;
1160
1426
  };
1161
1427
  export type GetAccountScreenshotsError = GetAccountScreenshotsErrors[keyof GetAccountScreenshotsErrors];
1162
1428
  export type GetAccountScreenshotsResponses = {
@@ -1192,9 +1458,7 @@ export type GetProjectScreenshotsErrors = {
1192
1458
  /**
1193
1459
  * Unauthorized
1194
1460
  */
1195
- 401: {
1196
- message: string;
1197
- };
1461
+ 401: ErrorResponse;
1198
1462
  /**
1199
1463
  * Forbidden - Permission denied
1200
1464
  */
@@ -1210,9 +1474,7 @@ export type GetProjectScreenshotsErrors = {
1210
1474
  /**
1211
1475
  * Internal server error
1212
1476
  */
1213
- 500: {
1214
- message: string;
1215
- };
1477
+ 500: ErrorResponse;
1216
1478
  };
1217
1479
  export type GetProjectScreenshotsError = GetProjectScreenshotsErrors[keyof GetProjectScreenshotsErrors];
1218
1480
  export type GetProjectScreenshotsResponses = {
@@ -1272,9 +1534,7 @@ export type TakeScreenshotErrors = {
1272
1534
  /**
1273
1535
  * Unauthorized
1274
1536
  */
1275
- 401: {
1276
- message: string;
1277
- };
1537
+ 401: ErrorResponse;
1278
1538
  /**
1279
1539
  * Forbidden - Permission denied
1280
1540
  */
@@ -1290,9 +1550,7 @@ export type TakeScreenshotErrors = {
1290
1550
  /**
1291
1551
  * Internal server error
1292
1552
  */
1293
- 500: {
1294
- message: string;
1295
- };
1553
+ 500: ErrorResponse;
1296
1554
  };
1297
1555
  export type TakeScreenshotError = TakeScreenshotErrors[keyof TakeScreenshotErrors];
1298
1556
  export type TakeScreenshotResponses = {
@@ -1344,4 +1602,132 @@ export type TakeScreenshotResponses = {
1344
1602
  };
1345
1603
  };
1346
1604
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1605
+ export type ScrapePageContentData = {
1606
+ body: {
1607
+ /**
1608
+ * URL of the page to scrape
1609
+ */
1610
+ url: string;
1611
+ /**
1612
+ * Only return the main content of the page excluding headers, navs, footers, etc.
1613
+ */
1614
+ onlyMainContent?: boolean;
1615
+ /**
1616
+ * Emulate scraping from a mobile device
1617
+ */
1618
+ mobile?: boolean;
1619
+ /**
1620
+ * Fetch external CSS stylesheets and inline them as <style> tags for fully self-contained HTML
1621
+ */
1622
+ inlineExternalCss?: boolean;
1623
+ /**
1624
+ * Include structured branding/design system data (colors, fonts, typography, spacing, components)
1625
+ */
1626
+ includeBranding?: boolean;
1627
+ };
1628
+ path?: never;
1629
+ query?: never;
1630
+ url: '/capture/scrape';
1631
+ };
1632
+ export type ScrapePageContentErrors = {
1633
+ /**
1634
+ * Bad request - Invalid parameters or malformed JSON
1635
+ */
1636
+ 400: {
1637
+ message: string;
1638
+ issues?: string;
1639
+ };
1640
+ /**
1641
+ * Unauthorized
1642
+ */
1643
+ 401: ErrorResponse;
1644
+ /**
1645
+ * Forbidden - Permission denied
1646
+ */
1647
+ 403: {
1648
+ message: string;
1649
+ };
1650
+ /**
1651
+ * Not found
1652
+ */
1653
+ 404: {
1654
+ message: string;
1655
+ };
1656
+ /**
1657
+ * Internal server error
1658
+ */
1659
+ 500: ErrorResponse;
1660
+ };
1661
+ export type ScrapePageContentError = ScrapePageContentErrors[keyof ScrapePageContentErrors];
1662
+ export type ScrapePageContentResponses = {
1663
+ /**
1664
+ * Page content scraped successfully
1665
+ */
1666
+ 200: {
1667
+ /**
1668
+ * Whether the operation succeeded
1669
+ */
1670
+ success: boolean;
1671
+ /**
1672
+ * Cleaned HTML content of the page (processed for readability)
1673
+ */
1674
+ html: string;
1675
+ /**
1676
+ * Raw HTML content of the page as-is
1677
+ */
1678
+ rawHtml: string;
1679
+ /**
1680
+ * Page metadata
1681
+ */
1682
+ metadata?: {
1683
+ title?: string;
1684
+ description?: string;
1685
+ language?: string;
1686
+ sourceURL?: string;
1687
+ keywords?: string;
1688
+ ogLocaleAlternate?: Array<string>;
1689
+ statusCode: number;
1690
+ error?: string;
1691
+ };
1692
+ /**
1693
+ * Structured branding/design system data (when includeBranding is true)
1694
+ */
1695
+ branding?: {
1696
+ colorScheme?: 'light' | 'dark' | null;
1697
+ logo?: string | null;
1698
+ colors?: {
1699
+ [key: string]: unknown;
1700
+ } | null;
1701
+ fonts?: Array<{
1702
+ [key: string]: unknown;
1703
+ }> | null;
1704
+ typography?: {
1705
+ [key: string]: unknown;
1706
+ } | null;
1707
+ spacing?: {
1708
+ [key: string]: unknown;
1709
+ } | null;
1710
+ components?: {
1711
+ [key: string]: unknown;
1712
+ } | null;
1713
+ images?: {
1714
+ [key: string]: unknown;
1715
+ } | null;
1716
+ [key: string]: unknown | 'light' | 'dark' | null | string | null | {
1717
+ [key: string]: unknown;
1718
+ } | null | Array<{
1719
+ [key: string]: unknown;
1720
+ }> | null | {
1721
+ [key: string]: unknown;
1722
+ } | null | {
1723
+ [key: string]: unknown;
1724
+ } | null | {
1725
+ [key: string]: unknown;
1726
+ } | null | {
1727
+ [key: string]: unknown;
1728
+ } | null | undefined;
1729
+ };
1730
+ };
1731
+ };
1732
+ export type ScrapePageContentResponse = ScrapePageContentResponses[keyof ScrapePageContentResponses];
1347
1733
  //# sourceMappingURL=types.gen.d.ts.map