@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.
package/src/types.gen.ts CHANGED
@@ -4,6 +4,10 @@ export type ClientOptions = {
4
4
  baseUrl: `${string}://${string}` | (string & {});
5
5
  };
6
6
 
7
+ export type ErrorResponse = {
8
+ message: string;
9
+ };
10
+
7
11
  export type BillingProduct = {
8
12
  prices: Array<BillingPrice>;
9
13
  product: StripeProduct;
@@ -70,6 +74,30 @@ export type ScheduledUpdate = {
70
74
  updateTime: number;
71
75
  };
72
76
 
77
+ export type Deployment = {
78
+ projectId: string;
79
+ netlifyDeployId: string;
80
+ netlifySiteId: string;
81
+ productionURL: string;
82
+ publishedAt: string;
83
+ createdAt: string;
84
+ };
85
+
86
+ export type ProjectRaw = {
87
+ id: string;
88
+ name: string;
89
+ userId: number;
90
+ createdAt: string;
91
+ lastOpenedAt: string | null;
92
+ latestScreenshot: string | null;
93
+ originTemplateId: string | null;
94
+ archivedAt: string | null;
95
+ };
96
+
97
+ export type OwnerDazlId = {
98
+ ownerDazlId: string;
99
+ };
100
+
73
101
  export type UploadConfiguration = {
74
102
  /**
75
103
  * Presigned URL for uploading the file
@@ -237,27 +265,19 @@ export type GetByDazlIdErrors = {
237
265
  /**
238
266
  * Unauthorized
239
267
  */
240
- 401: {
241
- message: string;
242
- };
268
+ 401: ErrorResponse;
243
269
  /**
244
270
  * Forbidden
245
271
  */
246
- 403: {
247
- message: string;
248
- };
272
+ 403: ErrorResponse;
249
273
  /**
250
274
  * Not Found
251
275
  */
252
- 404: {
253
- message: string;
254
- };
276
+ 404: ErrorResponse;
255
277
  /**
256
278
  * Internal server error
257
279
  */
258
- 500: {
259
- message: string;
260
- };
280
+ 500: ErrorResponse;
261
281
  };
262
282
 
263
283
  export type GetByDazlIdError = GetByDazlIdErrors[keyof GetByDazlIdErrors];
@@ -299,27 +319,19 @@ export type UpdateByDazlIdErrors = {
299
319
  /**
300
320
  * Unauthorized
301
321
  */
302
- 401: {
303
- message: string;
304
- };
322
+ 401: ErrorResponse;
305
323
  /**
306
324
  * Forbidden
307
325
  */
308
- 403: {
309
- message: string;
310
- };
326
+ 403: ErrorResponse;
311
327
  /**
312
328
  * Not Found
313
329
  */
314
- 404: {
315
- message: string;
316
- };
330
+ 404: ErrorResponse;
317
331
  /**
318
332
  * Internal server error
319
333
  */
320
- 500: {
321
- message: string;
322
- };
334
+ 500: ErrorResponse;
323
335
  };
324
336
 
325
337
  export type UpdateByDazlIdError = UpdateByDazlIdErrors[keyof UpdateByDazlIdErrors];
@@ -355,27 +367,19 @@ export type GetBalanceByDazlIdErrors = {
355
367
  /**
356
368
  * Unauthorized
357
369
  */
358
- 401: {
359
- message: string;
360
- };
370
+ 401: ErrorResponse;
361
371
  /**
362
372
  * Forbidden
363
373
  */
364
- 403: {
365
- message: string;
366
- };
374
+ 403: ErrorResponse;
367
375
  /**
368
376
  * Not Found
369
377
  */
370
- 404: {
371
- message: string;
372
- };
378
+ 404: ErrorResponse;
373
379
  /**
374
380
  * Internal server error
375
381
  */
376
- 500: {
377
- message: string;
378
- };
382
+ 500: ErrorResponse;
379
383
  };
380
384
 
381
385
  export type GetBalanceByDazlIdError = GetBalanceByDazlIdErrors[keyof GetBalanceByDazlIdErrors];
@@ -414,27 +418,19 @@ export type GetHasSufficientCreditsByDazlIdErrors = {
414
418
  /**
415
419
  * Unauthorized
416
420
  */
417
- 401: {
418
- message: string;
419
- };
421
+ 401: ErrorResponse;
420
422
  /**
421
423
  * Forbidden
422
424
  */
423
- 403: {
424
- message: string;
425
- };
425
+ 403: ErrorResponse;
426
426
  /**
427
427
  * Not Found
428
428
  */
429
- 404: {
430
- message: string;
431
- };
429
+ 404: ErrorResponse;
432
430
  /**
433
431
  * Internal server error
434
432
  */
435
- 500: {
436
- message: string;
437
- };
433
+ 500: ErrorResponse;
438
434
  };
439
435
 
440
436
  export type GetHasSufficientCreditsByDazlIdError = GetHasSufficientCreditsByDazlIdErrors[keyof GetHasSufficientCreditsByDazlIdErrors];
@@ -468,27 +464,19 @@ export type GetAllProductsErrors = {
468
464
  /**
469
465
  * Unauthorized
470
466
  */
471
- 401: {
472
- message: string;
473
- };
467
+ 401: ErrorResponse;
474
468
  /**
475
469
  * Forbidden
476
470
  */
477
- 403: {
478
- message: string;
479
- };
471
+ 403: ErrorResponse;
480
472
  /**
481
473
  * Not Found
482
474
  */
483
- 404: {
484
- message: string;
485
- };
475
+ 404: ErrorResponse;
486
476
  /**
487
477
  * Internal server error
488
478
  */
489
- 500: {
490
- message: string;
491
- };
479
+ 500: ErrorResponse;
492
480
  };
493
481
 
494
482
  export type GetAllProductsError = GetAllProductsErrors[keyof GetAllProductsErrors];
@@ -524,27 +512,19 @@ export type GetPriceByPriceIdErrors = {
524
512
  /**
525
513
  * Unauthorized
526
514
  */
527
- 401: {
528
- message: string;
529
- };
515
+ 401: ErrorResponse;
530
516
  /**
531
517
  * Forbidden
532
518
  */
533
- 403: {
534
- message: string;
535
- };
519
+ 403: ErrorResponse;
536
520
  /**
537
521
  * Not Found
538
522
  */
539
- 404: {
540
- message: string;
541
- };
523
+ 404: ErrorResponse;
542
524
  /**
543
525
  * Internal server error
544
526
  */
545
- 500: {
546
- message: string;
547
- };
527
+ 500: ErrorResponse;
548
528
  };
549
529
 
550
530
  export type GetPriceByPriceIdError = GetPriceByPriceIdErrors[keyof GetPriceByPriceIdErrors];
@@ -576,27 +556,19 @@ export type GetMaxCreditsForDefaultFreeErrors = {
576
556
  /**
577
557
  * Unauthorized
578
558
  */
579
- 401: {
580
- message: string;
581
- };
559
+ 401: ErrorResponse;
582
560
  /**
583
561
  * Forbidden
584
562
  */
585
- 403: {
586
- message: string;
587
- };
563
+ 403: ErrorResponse;
588
564
  /**
589
565
  * Not Found
590
566
  */
591
- 404: {
592
- message: string;
593
- };
567
+ 404: ErrorResponse;
594
568
  /**
595
569
  * Internal server error
596
570
  */
597
- 500: {
598
- message: string;
599
- };
571
+ 500: ErrorResponse;
600
572
  };
601
573
 
602
574
  export type GetMaxCreditsForDefaultFreeError = GetMaxCreditsForDefaultFreeErrors[keyof GetMaxCreditsForDefaultFreeErrors];
@@ -632,27 +604,19 @@ export type GetCustomerInfoByDazlIdErrors = {
632
604
  /**
633
605
  * Unauthorized
634
606
  */
635
- 401: {
636
- message: string;
637
- };
607
+ 401: ErrorResponse;
638
608
  /**
639
609
  * Forbidden
640
610
  */
641
- 403: {
642
- message: string;
643
- };
611
+ 403: ErrorResponse;
644
612
  /**
645
613
  * Not Found
646
614
  */
647
- 404: {
648
- message: string;
649
- };
615
+ 404: ErrorResponse;
650
616
  /**
651
617
  * Internal server error
652
618
  */
653
- 500: {
654
- message: string;
655
- };
619
+ 500: ErrorResponse;
656
620
  };
657
621
 
658
622
  export type GetCustomerInfoByDazlIdError = GetCustomerInfoByDazlIdErrors[keyof GetCustomerInfoByDazlIdErrors];
@@ -689,27 +653,19 @@ export type UpdateUserSubscriptionErrors = {
689
653
  /**
690
654
  * Unauthorized
691
655
  */
692
- 401: {
693
- message: string;
694
- };
656
+ 401: ErrorResponse;
695
657
  /**
696
658
  * Forbidden
697
659
  */
698
- 403: {
699
- message: string;
700
- };
660
+ 403: ErrorResponse;
701
661
  /**
702
662
  * Not Found
703
663
  */
704
- 404: {
705
- message: string;
706
- };
664
+ 404: ErrorResponse;
707
665
  /**
708
666
  * Internal server error
709
667
  */
710
- 500: {
711
- message: string;
712
- };
668
+ 500: ErrorResponse;
713
669
  };
714
670
 
715
671
  export type UpdateUserSubscriptionError = UpdateUserSubscriptionErrors[keyof UpdateUserSubscriptionErrors];
@@ -751,27 +707,19 @@ export type CancelScheduledUpdateByDazlIdErrors = {
751
707
  /**
752
708
  * Unauthorized
753
709
  */
754
- 401: {
755
- message: string;
756
- };
710
+ 401: ErrorResponse;
757
711
  /**
758
712
  * Forbidden
759
713
  */
760
- 403: {
761
- message: string;
762
- };
714
+ 403: ErrorResponse;
763
715
  /**
764
716
  * Not Found
765
717
  */
766
- 404: {
767
- message: string;
768
- };
718
+ 404: ErrorResponse;
769
719
  /**
770
720
  * Internal server error
771
721
  */
772
- 500: {
773
- message: string;
774
- };
722
+ 500: ErrorResponse;
775
723
  };
776
724
 
777
725
  export type CancelScheduledUpdateByDazlIdError = CancelScheduledUpdateByDazlIdErrors[keyof CancelScheduledUpdateByDazlIdErrors];
@@ -808,27 +756,19 @@ export type CreateCustomerPortalSessionErrors = {
808
756
  /**
809
757
  * Unauthorized
810
758
  */
811
- 401: {
812
- message: string;
813
- };
759
+ 401: ErrorResponse;
814
760
  /**
815
761
  * Forbidden
816
762
  */
817
- 403: {
818
- message: string;
819
- };
763
+ 403: ErrorResponse;
820
764
  /**
821
765
  * Not Found
822
766
  */
823
- 404: {
824
- message: string;
825
- };
767
+ 404: ErrorResponse;
826
768
  /**
827
769
  * Internal server error
828
770
  */
829
- 500: {
830
- message: string;
831
- };
771
+ 500: ErrorResponse;
832
772
  };
833
773
 
834
774
  export type CreateCustomerPortalSessionError = CreateCustomerPortalSessionErrors[keyof CreateCustomerPortalSessionErrors];
@@ -871,27 +811,19 @@ export type CreateCustomerWithDefaultSubscriptionErrors = {
871
811
  /**
872
812
  * Unauthorized
873
813
  */
874
- 401: {
875
- message: string;
876
- };
814
+ 401: ErrorResponse;
877
815
  /**
878
816
  * Forbidden
879
817
  */
880
- 403: {
881
- message: string;
882
- };
818
+ 403: ErrorResponse;
883
819
  /**
884
820
  * Not Found
885
821
  */
886
- 404: {
887
- message: string;
888
- };
822
+ 404: ErrorResponse;
889
823
  /**
890
824
  * Internal server error
891
825
  */
892
- 500: {
893
- message: string;
894
- };
826
+ 500: ErrorResponse;
895
827
  };
896
828
 
897
829
  export type CreateCustomerWithDefaultSubscriptionError = CreateCustomerWithDefaultSubscriptionErrors[keyof CreateCustomerWithDefaultSubscriptionErrors];
@@ -928,27 +860,19 @@ export type GetUserInfoByDazlIdErrors = {
928
860
  /**
929
861
  * Unauthorized
930
862
  */
931
- 401: {
932
- message: string;
933
- };
863
+ 401: ErrorResponse;
934
864
  /**
935
865
  * Forbidden
936
866
  */
937
- 403: {
938
- message: string;
939
- };
867
+ 403: ErrorResponse;
940
868
  /**
941
869
  * Not Found
942
870
  */
943
- 404: {
944
- message: string;
945
- };
871
+ 404: ErrorResponse;
946
872
  /**
947
873
  * Internal server error
948
874
  */
949
- 500: {
950
- message: string;
951
- };
875
+ 500: ErrorResponse;
952
876
  };
953
877
 
954
878
  export type GetUserInfoByDazlIdError = GetUserInfoByDazlIdErrors[keyof GetUserInfoByDazlIdErrors];
@@ -967,39 +891,21 @@ export type GetUserInfoByDazlIdResponses = {
967
891
 
968
892
  export type GetUserInfoByDazlIdResponse = GetUserInfoByDazlIdResponses[keyof GetUserInfoByDazlIdResponses];
969
893
 
970
- export type GetUploadConfigurationData = {
894
+ export type EnsureSiteIdData = {
971
895
  body: {
972
- /**
973
- * File path within the project
974
- */
975
- path: string;
976
- /**
977
- * Project identifier
978
- */
979
896
  projectId: string;
897
+ projectName: string;
980
898
  /**
981
- * MIME type of the file to upload
982
- */
983
- mimeType?: string;
984
- /**
985
- * Access control level for the file
986
- */
987
- acl?: 'public' | 'private';
988
- /**
989
- * Callback URL to notify after upload completion
990
- */
991
- callback?: string;
992
- /**
993
- * Upload protocol to use
899
+ * Dazl ID of the project owner to verify ownership
994
900
  */
995
- protocol?: 'tus';
901
+ dazlId?: string;
996
902
  };
997
903
  path?: never;
998
904
  query?: never;
999
- url: '/media/upload-configuration';
905
+ url: '/publish/site-id';
1000
906
  };
1001
907
 
1002
- export type GetUploadConfigurationErrors = {
908
+ export type EnsureSiteIdErrors = {
1003
909
  /**
1004
910
  * Bad request - Invalid parameters or malformed JSON
1005
911
  */
@@ -1010,77 +916,45 @@ export type GetUploadConfigurationErrors = {
1010
916
  /**
1011
917
  * Unauthorized
1012
918
  */
1013
- 401: {
1014
- message: string;
1015
- };
919
+ 401: ErrorResponse;
1016
920
  /**
1017
- * Forbidden - Permission denied
921
+ * Forbidden
1018
922
  */
1019
- 403: {
1020
- message: string;
1021
- };
923
+ 403: ErrorResponse;
1022
924
  /**
1023
- * Not found
925
+ * Not Found
1024
926
  */
1025
- 404: {
1026
- message: string;
1027
- };
927
+ 404: ErrorResponse;
1028
928
  /**
1029
929
  * Internal server error
1030
930
  */
1031
- 500: {
1032
- message: string;
1033
- };
931
+ 500: ErrorResponse;
1034
932
  };
1035
933
 
1036
- export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
934
+ export type EnsureSiteIdError = EnsureSiteIdErrors[keyof EnsureSiteIdErrors];
1037
935
 
1038
- export type GetUploadConfigurationResponses = {
936
+ export type EnsureSiteIdResponses = {
1039
937
  /**
1040
- * Returns presigned upload URL and configuration
938
+ * Returns the Netlify site ID for the given project, creates one when missing
1041
939
  */
1042
- 200: UploadConfiguration;
940
+ 200: {
941
+ siteId: string;
942
+ };
1043
943
  };
1044
944
 
1045
- export type GetUploadConfigurationResponse = GetUploadConfigurationResponses[keyof GetUploadConfigurationResponses];
945
+ export type EnsureSiteIdResponse = EnsureSiteIdResponses[keyof EnsureSiteIdResponses];
1046
946
 
1047
- export type ListFilesData = {
947
+ export type GetLatestDeployData = {
1048
948
  body?: never;
1049
949
  path?: never;
1050
950
  query: {
1051
- /**
1052
- * Project identifier
1053
- */
1054
951
  projectId: string;
1055
- /**
1056
- * Path within the project to list files from
1057
- */
1058
- path?: string;
1059
- /**
1060
- * Filter by type: '-' for files, 'd' for directories
1061
- */
1062
- type?: '-' | 'd';
1063
- /**
1064
- * Field to order results by
1065
- */
1066
- orderBy?: 'dateUpdated' | 'name';
1067
- /**
1068
- * Sort direction
1069
- */
1070
- orderDirection?: 'asc' | 'desc';
1071
- /**
1072
- * Number of items per page
1073
- */
1074
- pageSize?: number;
1075
- /**
1076
- * Token for fetching the next page of results
1077
- */
1078
- nextPageToken?: string;
952
+ dazlId: string;
1079
953
  };
1080
- url: '/media/list';
954
+ url: '/publish/latest';
1081
955
  };
1082
956
 
1083
- export type ListFilesErrors = {
957
+ export type GetLatestDeployErrors = {
1084
958
  /**
1085
959
  * Bad request - Invalid parameters or malformed JSON
1086
960
  */
@@ -1091,56 +965,500 @@ export type ListFilesErrors = {
1091
965
  /**
1092
966
  * Unauthorized
1093
967
  */
1094
- 401: {
1095
- message: string;
1096
- };
968
+ 401: ErrorResponse;
1097
969
  /**
1098
- * Forbidden - Permission denied
970
+ * Forbidden
1099
971
  */
1100
- 403: {
1101
- message: string;
1102
- };
972
+ 403: ErrorResponse;
1103
973
  /**
1104
- * Not found
974
+ * Not Found
1105
975
  */
1106
- 404: {
1107
- message: string;
1108
- };
976
+ 404: ErrorResponse;
1109
977
  /**
1110
978
  * Internal server error
1111
979
  */
1112
- 500: {
1113
- message: string;
1114
- };
980
+ 500: ErrorResponse;
1115
981
  };
1116
982
 
1117
- export type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
983
+ export type GetLatestDeployError = GetLatestDeployErrors[keyof GetLatestDeployErrors];
1118
984
 
1119
- export type ListFilesResponses = {
985
+ export type GetLatestDeployResponses = {
1120
986
  /**
1121
- * Returns paginated list of files in the project
987
+ * Returns the latest deployment info for the given project
1122
988
  */
1123
- 200: MediaFileList;
989
+ 200: Deployment;
1124
990
  };
1125
991
 
1126
- export type ListFilesResponse = ListFilesResponses[keyof ListFilesResponses];
992
+ export type GetLatestDeployResponse = GetLatestDeployResponses[keyof GetLatestDeployResponses];
1127
993
 
1128
- export type CreateMediaData = {
994
+ export type UpsertDeployInDbData = {
1129
995
  body: {
996
+ projectId: string;
997
+ netlifyDeployId: string;
1130
998
  /**
1131
- * Unique identifier for the media file
1132
- */
1133
- id: string;
1134
- /**
1135
- * MIME type of the media file
1136
- */
1137
- mimeType: string;
1138
- /**
1139
- * URL where the media file is accessible
1140
- */
1141
- url: string;
1142
- /**
1143
- * User's Dazl ID (required for internal API calls)
999
+ * Dazl ID of the project owner to verify ownership
1000
+ */
1001
+ dazlId?: string;
1002
+ };
1003
+ path?: never;
1004
+ query?: never;
1005
+ url: '/publish/upsert-deploy';
1006
+ };
1007
+
1008
+ export type UpsertDeployInDbErrors = {
1009
+ /**
1010
+ * Bad request - Invalid parameters or malformed JSON
1011
+ */
1012
+ 400: {
1013
+ message: string;
1014
+ issues?: string;
1015
+ };
1016
+ /**
1017
+ * Unauthorized
1018
+ */
1019
+ 401: ErrorResponse;
1020
+ /**
1021
+ * Forbidden
1022
+ */
1023
+ 403: ErrorResponse;
1024
+ /**
1025
+ * Not Found
1026
+ */
1027
+ 404: ErrorResponse;
1028
+ /**
1029
+ * Internal server error
1030
+ */
1031
+ 500: ErrorResponse;
1032
+ };
1033
+
1034
+ export type UpsertDeployInDbError = UpsertDeployInDbErrors[keyof UpsertDeployInDbErrors];
1035
+
1036
+ export type UpsertDeployInDbResponses = {
1037
+ /**
1038
+ * Successfully created or updated deployment record in the database
1039
+ */
1040
+ 200: Deployment;
1041
+ };
1042
+
1043
+ export type UpsertDeployInDbResponse = UpsertDeployInDbResponses[keyof UpsertDeployInDbResponses];
1044
+
1045
+ export type UpdateEnvVarsData = {
1046
+ body: {
1047
+ siteId: string;
1048
+ envVars: {
1049
+ [key: string]: string;
1050
+ };
1051
+ };
1052
+ path?: never;
1053
+ query?: never;
1054
+ url: '/publish/env-vars';
1055
+ };
1056
+
1057
+ export type UpdateEnvVarsErrors = {
1058
+ /**
1059
+ * Bad request - Invalid parameters or malformed JSON
1060
+ */
1061
+ 400: {
1062
+ message: string;
1063
+ issues?: string;
1064
+ };
1065
+ /**
1066
+ * Unauthorized
1067
+ */
1068
+ 401: ErrorResponse;
1069
+ /**
1070
+ * Forbidden
1071
+ */
1072
+ 403: ErrorResponse;
1073
+ /**
1074
+ * Not Found
1075
+ */
1076
+ 404: ErrorResponse;
1077
+ /**
1078
+ * Internal server error
1079
+ */
1080
+ 500: ErrorResponse;
1081
+ };
1082
+
1083
+ export type UpdateEnvVarsError = UpdateEnvVarsErrors[keyof UpdateEnvVarsErrors];
1084
+
1085
+ export type UpdateEnvVarsResponses = {
1086
+ /**
1087
+ * Successfully updated environment variables
1088
+ */
1089
+ 200: {
1090
+ success: boolean;
1091
+ };
1092
+ };
1093
+
1094
+ export type UpdateEnvVarsResponse = UpdateEnvVarsResponses[keyof UpdateEnvVarsResponses];
1095
+
1096
+ export type DuplicateProjectData = {
1097
+ body: OwnerDazlId;
1098
+ path: {
1099
+ projectId: string;
1100
+ };
1101
+ query?: never;
1102
+ url: '/project/duplicate/{projectId}';
1103
+ };
1104
+
1105
+ export type DuplicateProjectErrors = {
1106
+ /**
1107
+ * Bad request - Invalid parameters or malformed JSON
1108
+ */
1109
+ 400: {
1110
+ message: string;
1111
+ issues?: string;
1112
+ };
1113
+ /**
1114
+ * Unauthorized
1115
+ */
1116
+ 401: ErrorResponse;
1117
+ /**
1118
+ * Forbidden
1119
+ */
1120
+ 403: ErrorResponse;
1121
+ /**
1122
+ * Not Found
1123
+ */
1124
+ 404: ErrorResponse;
1125
+ /**
1126
+ * Internal server error
1127
+ */
1128
+ 500: ErrorResponse;
1129
+ };
1130
+
1131
+ export type DuplicateProjectError = DuplicateProjectErrors[keyof DuplicateProjectErrors];
1132
+
1133
+ export type DuplicateProjectResponses = {
1134
+ /**
1135
+ * Returns the new duplicated project
1136
+ */
1137
+ 200: {
1138
+ project: ProjectRaw;
1139
+ };
1140
+ };
1141
+
1142
+ export type DuplicateProjectResponse = DuplicateProjectResponses[keyof DuplicateProjectResponses];
1143
+
1144
+ export type DeleteProjectData = {
1145
+ body: OwnerDazlId;
1146
+ path: {
1147
+ projectId: string;
1148
+ };
1149
+ query?: never;
1150
+ url: '/project/{projectId}';
1151
+ };
1152
+
1153
+ export type DeleteProjectErrors = {
1154
+ /**
1155
+ * Bad request - Invalid parameters or malformed JSON
1156
+ */
1157
+ 400: {
1158
+ message: string;
1159
+ issues?: string;
1160
+ };
1161
+ /**
1162
+ * Unauthorized
1163
+ */
1164
+ 401: ErrorResponse;
1165
+ /**
1166
+ * Forbidden
1167
+ */
1168
+ 403: ErrorResponse;
1169
+ /**
1170
+ * Not Found
1171
+ */
1172
+ 404: ErrorResponse;
1173
+ /**
1174
+ * Internal server error
1175
+ */
1176
+ 500: ErrorResponse;
1177
+ };
1178
+
1179
+ export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors];
1180
+
1181
+ export type DeleteProjectResponses = {
1182
+ /**
1183
+ * Returns the deleted project ID and confirmation message
1184
+ */
1185
+ 200: {
1186
+ projectId: string;
1187
+ };
1188
+ };
1189
+
1190
+ export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses];
1191
+
1192
+ export type GetProjectByIdData = {
1193
+ body?: never;
1194
+ path: {
1195
+ projectId: string;
1196
+ };
1197
+ query: {
1198
+ ownerDazlId: string;
1199
+ };
1200
+ url: '/project/{projectId}';
1201
+ };
1202
+
1203
+ export type GetProjectByIdErrors = {
1204
+ /**
1205
+ * Bad request - Invalid parameters or malformed JSON
1206
+ */
1207
+ 400: {
1208
+ message: string;
1209
+ issues?: string;
1210
+ };
1211
+ /**
1212
+ * Unauthorized
1213
+ */
1214
+ 401: ErrorResponse;
1215
+ /**
1216
+ * Forbidden
1217
+ */
1218
+ 403: ErrorResponse;
1219
+ /**
1220
+ * Not Found
1221
+ */
1222
+ 404: ErrorResponse;
1223
+ /**
1224
+ * Internal server error
1225
+ */
1226
+ 500: ErrorResponse;
1227
+ };
1228
+
1229
+ export type GetProjectByIdError = GetProjectByIdErrors[keyof GetProjectByIdErrors];
1230
+
1231
+ export type GetProjectByIdResponses = {
1232
+ /**
1233
+ * Returns the requested project
1234
+ */
1235
+ 200: {
1236
+ project: ProjectRaw;
1237
+ };
1238
+ };
1239
+
1240
+ export type GetProjectByIdResponse = GetProjectByIdResponses[keyof GetProjectByIdResponses];
1241
+
1242
+ export type UpdateProjectData = {
1243
+ body: {
1244
+ name?: string;
1245
+ lastOpenedAt?: string | null;
1246
+ latestScreenshot?: string | null;
1247
+ archivedAt?: string | null;
1248
+ ownerDazlId: string;
1249
+ };
1250
+ path: {
1251
+ projectId: string;
1252
+ };
1253
+ query?: never;
1254
+ url: '/project/{projectId}';
1255
+ };
1256
+
1257
+ export type UpdateProjectErrors = {
1258
+ /**
1259
+ * Bad request - Invalid parameters or malformed JSON
1260
+ */
1261
+ 400: {
1262
+ message: string;
1263
+ issues?: string;
1264
+ };
1265
+ /**
1266
+ * Unauthorized
1267
+ */
1268
+ 401: ErrorResponse;
1269
+ /**
1270
+ * Forbidden
1271
+ */
1272
+ 403: ErrorResponse;
1273
+ /**
1274
+ * Not Found
1275
+ */
1276
+ 404: ErrorResponse;
1277
+ /**
1278
+ * Internal server error
1279
+ */
1280
+ 500: ErrorResponse;
1281
+ };
1282
+
1283
+ export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];
1284
+
1285
+ export type UpdateProjectResponses = {
1286
+ /**
1287
+ * Returns the updated project
1288
+ */
1289
+ 200: {
1290
+ project: ProjectRaw;
1291
+ };
1292
+ };
1293
+
1294
+ export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
1295
+
1296
+ export type GetUploadConfigurationData = {
1297
+ body: {
1298
+ /**
1299
+ * File path within the project
1300
+ */
1301
+ path: string;
1302
+ /**
1303
+ * Project identifier
1304
+ */
1305
+ projectId: string;
1306
+ /**
1307
+ * MIME type of the file to upload
1308
+ */
1309
+ mimeType?: string;
1310
+ /**
1311
+ * Access control level for the file
1312
+ */
1313
+ acl?: 'public' | 'private';
1314
+ /**
1315
+ * Callback URL to notify after upload completion
1316
+ */
1317
+ callback?: string;
1318
+ /**
1319
+ * Upload protocol to use
1320
+ */
1321
+ protocol?: 'tus';
1322
+ };
1323
+ path?: never;
1324
+ query?: never;
1325
+ url: '/media/upload-configuration';
1326
+ };
1327
+
1328
+ export type GetUploadConfigurationErrors = {
1329
+ /**
1330
+ * Bad request - Invalid parameters or malformed JSON
1331
+ */
1332
+ 400: {
1333
+ message: string;
1334
+ issues?: string;
1335
+ };
1336
+ /**
1337
+ * Unauthorized
1338
+ */
1339
+ 401: ErrorResponse;
1340
+ /**
1341
+ * Forbidden - Permission denied
1342
+ */
1343
+ 403: {
1344
+ message: string;
1345
+ };
1346
+ /**
1347
+ * Not found
1348
+ */
1349
+ 404: {
1350
+ message: string;
1351
+ };
1352
+ /**
1353
+ * Internal server error
1354
+ */
1355
+ 500: ErrorResponse;
1356
+ };
1357
+
1358
+ export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
1359
+
1360
+ export type GetUploadConfigurationResponses = {
1361
+ /**
1362
+ * Returns presigned upload URL and configuration
1363
+ */
1364
+ 200: UploadConfiguration;
1365
+ };
1366
+
1367
+ export type GetUploadConfigurationResponse = GetUploadConfigurationResponses[keyof GetUploadConfigurationResponses];
1368
+
1369
+ export type ListFilesData = {
1370
+ body?: never;
1371
+ path?: never;
1372
+ query: {
1373
+ /**
1374
+ * Project identifier
1375
+ */
1376
+ projectId: string;
1377
+ /**
1378
+ * Path within the project to list files from
1379
+ */
1380
+ path?: string;
1381
+ /**
1382
+ * Filter by type: '-' for files, 'd' for directories
1383
+ */
1384
+ type?: '-' | 'd';
1385
+ /**
1386
+ * Field to order results by
1387
+ */
1388
+ orderBy?: 'dateUpdated' | 'name';
1389
+ /**
1390
+ * Sort direction
1391
+ */
1392
+ orderDirection?: 'asc' | 'desc';
1393
+ /**
1394
+ * Number of items per page
1395
+ */
1396
+ pageSize?: number;
1397
+ /**
1398
+ * Token for fetching the next page of results
1399
+ */
1400
+ nextPageToken?: string;
1401
+ };
1402
+ url: '/media/list';
1403
+ };
1404
+
1405
+ export type ListFilesErrors = {
1406
+ /**
1407
+ * Bad request - Invalid parameters or malformed JSON
1408
+ */
1409
+ 400: {
1410
+ message: string;
1411
+ issues?: string;
1412
+ };
1413
+ /**
1414
+ * Unauthorized
1415
+ */
1416
+ 401: ErrorResponse;
1417
+ /**
1418
+ * Forbidden - Permission denied
1419
+ */
1420
+ 403: {
1421
+ message: string;
1422
+ };
1423
+ /**
1424
+ * Not found
1425
+ */
1426
+ 404: {
1427
+ message: string;
1428
+ };
1429
+ /**
1430
+ * Internal server error
1431
+ */
1432
+ 500: ErrorResponse;
1433
+ };
1434
+
1435
+ export type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
1436
+
1437
+ export type ListFilesResponses = {
1438
+ /**
1439
+ * Returns paginated list of files in the project
1440
+ */
1441
+ 200: MediaFileList;
1442
+ };
1443
+
1444
+ export type ListFilesResponse = ListFilesResponses[keyof ListFilesResponses];
1445
+
1446
+ export type CreateMediaData = {
1447
+ body: {
1448
+ /**
1449
+ * Unique identifier for the media file
1450
+ */
1451
+ id: string;
1452
+ /**
1453
+ * MIME type of the media file
1454
+ */
1455
+ mimeType: string;
1456
+ /**
1457
+ * URL where the media file is accessible
1458
+ */
1459
+ url: string;
1460
+ /**
1461
+ * User's Dazl ID (required for internal API calls)
1144
1462
  */
1145
1463
  dazlId?: string;
1146
1464
  /**
@@ -1174,9 +1492,7 @@ export type CreateMediaErrors = {
1174
1492
  /**
1175
1493
  * Unauthorized
1176
1494
  */
1177
- 401: {
1178
- message: string;
1179
- };
1495
+ 401: ErrorResponse;
1180
1496
  /**
1181
1497
  * Forbidden - Permission denied
1182
1498
  */
@@ -1192,9 +1508,7 @@ export type CreateMediaErrors = {
1192
1508
  /**
1193
1509
  * Internal server error
1194
1510
  */
1195
- 500: {
1196
- message: string;
1197
- };
1511
+ 500: ErrorResponse;
1198
1512
  };
1199
1513
 
1200
1514
  export type CreateMediaError = CreateMediaErrors[keyof CreateMediaErrors];
@@ -1229,9 +1543,7 @@ export type GetAccountScreenshotsErrors = {
1229
1543
  /**
1230
1544
  * Unauthorized
1231
1545
  */
1232
- 401: {
1233
- message: string;
1234
- };
1546
+ 401: ErrorResponse;
1235
1547
  /**
1236
1548
  * Forbidden - Permission denied
1237
1549
  */
@@ -1247,9 +1559,7 @@ export type GetAccountScreenshotsErrors = {
1247
1559
  /**
1248
1560
  * Internal server error
1249
1561
  */
1250
- 500: {
1251
- message: string;
1252
- };
1562
+ 500: ErrorResponse;
1253
1563
  };
1254
1564
 
1255
1565
  export type GetAccountScreenshotsError = GetAccountScreenshotsErrors[keyof GetAccountScreenshotsErrors];
@@ -1290,9 +1600,7 @@ export type GetProjectScreenshotsErrors = {
1290
1600
  /**
1291
1601
  * Unauthorized
1292
1602
  */
1293
- 401: {
1294
- message: string;
1295
- };
1603
+ 401: ErrorResponse;
1296
1604
  /**
1297
1605
  * Forbidden - Permission denied
1298
1606
  */
@@ -1308,9 +1616,7 @@ export type GetProjectScreenshotsErrors = {
1308
1616
  /**
1309
1617
  * Internal server error
1310
1618
  */
1311
- 500: {
1312
- message: string;
1313
- };
1619
+ 500: ErrorResponse;
1314
1620
  };
1315
1621
 
1316
1622
  export type GetProjectScreenshotsError = GetProjectScreenshotsErrors[keyof GetProjectScreenshotsErrors];
@@ -1375,9 +1681,7 @@ export type TakeScreenshotErrors = {
1375
1681
  /**
1376
1682
  * Unauthorized
1377
1683
  */
1378
- 401: {
1379
- message: string;
1380
- };
1684
+ 401: ErrorResponse;
1381
1685
  /**
1382
1686
  * Forbidden - Permission denied
1383
1687
  */
@@ -1393,9 +1697,7 @@ export type TakeScreenshotErrors = {
1393
1697
  /**
1394
1698
  * Internal server error
1395
1699
  */
1396
- 500: {
1397
- message: string;
1398
- };
1700
+ 500: ErrorResponse;
1399
1701
  };
1400
1702
 
1401
1703
  export type TakeScreenshotError = TakeScreenshotErrors[keyof TakeScreenshotErrors];
@@ -1450,3 +1752,136 @@ export type TakeScreenshotResponses = {
1450
1752
  };
1451
1753
 
1452
1754
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1755
+
1756
+ export type ScrapePageContentData = {
1757
+ body: {
1758
+ /**
1759
+ * URL of the page to scrape
1760
+ */
1761
+ url: string;
1762
+ /**
1763
+ * Only return the main content of the page excluding headers, navs, footers, etc.
1764
+ */
1765
+ onlyMainContent?: boolean;
1766
+ /**
1767
+ * Emulate scraping from a mobile device
1768
+ */
1769
+ mobile?: boolean;
1770
+ /**
1771
+ * Fetch external CSS stylesheets and inline them as <style> tags for fully self-contained HTML
1772
+ */
1773
+ inlineExternalCss?: boolean;
1774
+ /**
1775
+ * Include structured branding/design system data (colors, fonts, typography, spacing, components)
1776
+ */
1777
+ includeBranding?: boolean;
1778
+ };
1779
+ path?: never;
1780
+ query?: never;
1781
+ url: '/capture/scrape';
1782
+ };
1783
+
1784
+ export type ScrapePageContentErrors = {
1785
+ /**
1786
+ * Bad request - Invalid parameters or malformed JSON
1787
+ */
1788
+ 400: {
1789
+ message: string;
1790
+ issues?: string;
1791
+ };
1792
+ /**
1793
+ * Unauthorized
1794
+ */
1795
+ 401: ErrorResponse;
1796
+ /**
1797
+ * Forbidden - Permission denied
1798
+ */
1799
+ 403: {
1800
+ message: string;
1801
+ };
1802
+ /**
1803
+ * Not found
1804
+ */
1805
+ 404: {
1806
+ message: string;
1807
+ };
1808
+ /**
1809
+ * Internal server error
1810
+ */
1811
+ 500: ErrorResponse;
1812
+ };
1813
+
1814
+ export type ScrapePageContentError = ScrapePageContentErrors[keyof ScrapePageContentErrors];
1815
+
1816
+ export type ScrapePageContentResponses = {
1817
+ /**
1818
+ * Page content scraped successfully
1819
+ */
1820
+ 200: {
1821
+ /**
1822
+ * Whether the operation succeeded
1823
+ */
1824
+ success: boolean;
1825
+ /**
1826
+ * Cleaned HTML content of the page (processed for readability)
1827
+ */
1828
+ html: string;
1829
+ /**
1830
+ * Raw HTML content of the page as-is
1831
+ */
1832
+ rawHtml: string;
1833
+ /**
1834
+ * Page metadata
1835
+ */
1836
+ metadata?: {
1837
+ title?: string;
1838
+ description?: string;
1839
+ language?: string;
1840
+ sourceURL?: string;
1841
+ keywords?: string;
1842
+ ogLocaleAlternate?: Array<string>;
1843
+ statusCode: number;
1844
+ error?: string;
1845
+ };
1846
+ /**
1847
+ * Structured branding/design system data (when includeBranding is true)
1848
+ */
1849
+ branding?: {
1850
+ colorScheme?: 'light' | 'dark' | null;
1851
+ logo?: string | null;
1852
+ colors?: {
1853
+ [key: string]: unknown;
1854
+ } | null;
1855
+ fonts?: Array<{
1856
+ [key: string]: unknown;
1857
+ }> | null;
1858
+ typography?: {
1859
+ [key: string]: unknown;
1860
+ } | null;
1861
+ spacing?: {
1862
+ [key: string]: unknown;
1863
+ } | null;
1864
+ components?: {
1865
+ [key: string]: unknown;
1866
+ } | null;
1867
+ images?: {
1868
+ [key: string]: unknown;
1869
+ } | null;
1870
+ [key: string]: unknown | 'light' | 'dark' | null | string | null | {
1871
+ [key: string]: unknown;
1872
+ } | null | Array<{
1873
+ [key: string]: unknown;
1874
+ }> | null | {
1875
+ [key: string]: unknown;
1876
+ } | null | {
1877
+ [key: string]: unknown;
1878
+ } | null | {
1879
+ [key: string]: unknown;
1880
+ } | null | {
1881
+ [key: string]: unknown;
1882
+ } | null | undefined;
1883
+ };
1884
+ };
1885
+ };
1886
+
1887
+ export type ScrapePageContentResponse = ScrapePageContentResponses[keyof ScrapePageContentResponses];