@dazl/internal-api-client 1.3.0 → 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,16 @@ export type ClientOptions = {
4
4
  baseUrl: `${string}://${string}` | (string & {});
5
5
  };
6
6
 
7
+ export type ErrorResponse = {
8
+ message: string;
9
+ };
10
+
11
+ export type BillingProduct = {
12
+ prices: Array<BillingPrice>;
13
+ product: StripeProduct;
14
+ isDefaultFree?: boolean;
15
+ };
16
+
7
17
  export type BillingPrice = {
8
18
  credits: number;
9
19
  priceCents: number;
@@ -37,22 +47,6 @@ export type StripeProduct = {
37
47
  url: string | null;
38
48
  };
39
49
 
40
- export type BillingProduct = {
41
- prices: Array<BillingPrice>;
42
- product: StripeProduct;
43
- isDefaultFree?: boolean;
44
- };
45
-
46
- export type ScheduledUpdate = {
47
- type: 'downgrade';
48
- scheduleId: string;
49
- targetPriceId: string;
50
- updateTime: number;
51
- } | {
52
- type: 'cancel';
53
- updateTime: number;
54
- };
55
-
56
50
  export type CustomerInfo = {
57
51
  productId: string;
58
52
  credits: number;
@@ -70,6 +64,40 @@ export type CustomerInfo = {
70
64
  hasEarlyAccessCoupon: boolean;
71
65
  };
72
66
 
67
+ export type ScheduledUpdate = {
68
+ type: 'downgrade';
69
+ scheduleId: string;
70
+ targetPriceId: string;
71
+ updateTime: number;
72
+ } | {
73
+ type: 'cancel';
74
+ updateTime: number;
75
+ };
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
@@ -81,6 +109,17 @@ export type UploadConfiguration = {
81
109
  uploadToken?: string;
82
110
  };
83
111
 
112
+ export type MediaFileList = {
113
+ /**
114
+ * Token for fetching the next page, undefined if no more pages
115
+ */
116
+ nextPageToken?: string;
117
+ /**
118
+ * Array of file descriptors
119
+ */
120
+ files: Array<MediaFile>;
121
+ };
122
+
84
123
  export type MediaFile = {
85
124
  /**
86
125
  * Unique file identifier
@@ -120,17 +159,6 @@ export type MediaFile = {
120
159
  dateUpdated: string;
121
160
  };
122
161
 
123
- export type MediaFileList = {
124
- /**
125
- * Token for fetching the next page, undefined if no more pages
126
- */
127
- nextPageToken?: string;
128
- /**
129
- * Array of file descriptors
130
- */
131
- files: Array<MediaFile>;
132
- };
133
-
134
162
  export type ProjectWithScreenshot = {
135
163
  /**
136
164
  * Project identifier
@@ -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];
@@ -386,9 +390,9 @@ export type GetBalanceByDazlIdResponses = {
386
390
  */
387
391
  200: {
388
392
  balance: number;
389
- productId?: string;
390
- priceId?: string;
391
- isSubscriptionFree?: boolean;
393
+ productId: string | null;
394
+ priceId: string | null;
395
+ isSubscriptionFree: boolean | null;
392
396
  };
393
397
  };
394
398
 
@@ -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,55 +916,471 @@ 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
- */
952
+ dazlId: string;
953
+ };
954
+ url: '/publish/latest';
955
+ };
956
+
957
+ export type GetLatestDeployErrors = {
958
+ /**
959
+ * Bad request - Invalid parameters or malformed JSON
960
+ */
961
+ 400: {
962
+ message: string;
963
+ issues?: string;
964
+ };
965
+ /**
966
+ * Unauthorized
967
+ */
968
+ 401: ErrorResponse;
969
+ /**
970
+ * Forbidden
971
+ */
972
+ 403: ErrorResponse;
973
+ /**
974
+ * Not Found
975
+ */
976
+ 404: ErrorResponse;
977
+ /**
978
+ * Internal server error
979
+ */
980
+ 500: ErrorResponse;
981
+ };
982
+
983
+ export type GetLatestDeployError = GetLatestDeployErrors[keyof GetLatestDeployErrors];
984
+
985
+ export type GetLatestDeployResponses = {
986
+ /**
987
+ * Returns the latest deployment info for the given project
988
+ */
989
+ 200: Deployment;
990
+ };
991
+
992
+ export type GetLatestDeployResponse = GetLatestDeployResponses[keyof GetLatestDeployResponses];
993
+
994
+ export type UpsertDeployInDbData = {
995
+ body: {
996
+ projectId: string;
997
+ netlifyDeployId: string;
998
+ /**
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
+ */
1062
1384
  type?: '-' | 'd';
1063
1385
  /**
1064
1386
  * Field to order results by
@@ -1091,9 +1413,7 @@ export type ListFilesErrors = {
1091
1413
  /**
1092
1414
  * Unauthorized
1093
1415
  */
1094
- 401: {
1095
- message: string;
1096
- };
1416
+ 401: ErrorResponse;
1097
1417
  /**
1098
1418
  * Forbidden - Permission denied
1099
1419
  */
@@ -1109,9 +1429,7 @@ export type ListFilesErrors = {
1109
1429
  /**
1110
1430
  * Internal server error
1111
1431
  */
1112
- 500: {
1113
- message: string;
1114
- };
1432
+ 500: ErrorResponse;
1115
1433
  };
1116
1434
 
1117
1435
  export type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
@@ -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];
@@ -1209,7 +1523,12 @@ export type CreateMediaResponses = {
1209
1523
  export type GetAccountScreenshotsData = {
1210
1524
  body?: never;
1211
1525
  path?: never;
1212
- query?: never;
1526
+ query?: {
1527
+ /**
1528
+ * User's Dazl ID (required for internal API calls without authentication)
1529
+ */
1530
+ dazlId?: string;
1531
+ };
1213
1532
  url: '/media/account-screenshots';
1214
1533
  };
1215
1534
 
@@ -1224,9 +1543,7 @@ export type GetAccountScreenshotsErrors = {
1224
1543
  /**
1225
1544
  * Unauthorized
1226
1545
  */
1227
- 401: {
1228
- message: string;
1229
- };
1546
+ 401: ErrorResponse;
1230
1547
  /**
1231
1548
  * Forbidden - Permission denied
1232
1549
  */
@@ -1242,9 +1559,7 @@ export type GetAccountScreenshotsErrors = {
1242
1559
  /**
1243
1560
  * Internal server error
1244
1561
  */
1245
- 500: {
1246
- message: string;
1247
- };
1562
+ 500: ErrorResponse;
1248
1563
  };
1249
1564
 
1250
1565
  export type GetAccountScreenshotsError = GetAccountScreenshotsErrors[keyof GetAccountScreenshotsErrors];
@@ -1266,6 +1581,10 @@ export type GetProjectScreenshotsData = {
1266
1581
  * Project identifier
1267
1582
  */
1268
1583
  projectId: string;
1584
+ /**
1585
+ * User's Dazl ID (required for internal API calls without authentication)
1586
+ */
1587
+ dazlId?: string;
1269
1588
  };
1270
1589
  url: '/media/project-screenshots';
1271
1590
  };
@@ -1281,9 +1600,7 @@ export type GetProjectScreenshotsErrors = {
1281
1600
  /**
1282
1601
  * Unauthorized
1283
1602
  */
1284
- 401: {
1285
- message: string;
1286
- };
1603
+ 401: ErrorResponse;
1287
1604
  /**
1288
1605
  * Forbidden - Permission denied
1289
1606
  */
@@ -1299,9 +1616,7 @@ export type GetProjectScreenshotsErrors = {
1299
1616
  /**
1300
1617
  * Internal server error
1301
1618
  */
1302
- 500: {
1303
- message: string;
1304
- };
1619
+ 500: ErrorResponse;
1305
1620
  };
1306
1621
 
1307
1622
  export type GetProjectScreenshotsError = GetProjectScreenshotsErrors[keyof GetProjectScreenshotsErrors];
@@ -1366,9 +1681,7 @@ export type TakeScreenshotErrors = {
1366
1681
  /**
1367
1682
  * Unauthorized
1368
1683
  */
1369
- 401: {
1370
- message: string;
1371
- };
1684
+ 401: ErrorResponse;
1372
1685
  /**
1373
1686
  * Forbidden - Permission denied
1374
1687
  */
@@ -1384,9 +1697,7 @@ export type TakeScreenshotErrors = {
1384
1697
  /**
1385
1698
  * Internal server error
1386
1699
  */
1387
- 500: {
1388
- message: string;
1389
- };
1700
+ 500: ErrorResponse;
1390
1701
  };
1391
1702
 
1392
1703
  export type TakeScreenshotError = TakeScreenshotErrors[keyof TakeScreenshotErrors];
@@ -1407,11 +1718,7 @@ export type TakeScreenshotResponses = {
1407
1718
  /**
1408
1719
  * Public URL of the screenshot
1409
1720
  */
1410
- imageUrl: string;
1411
- /**
1412
- * Storage provider used
1413
- */
1414
- storageProvider: string;
1721
+ publicUrl: string;
1415
1722
  /**
1416
1723
  * Screenshot metadata
1417
1724
  */
@@ -1440,45 +1747,41 @@ export type TakeScreenshotResponses = {
1440
1747
  * Associated project ID
1441
1748
  */
1442
1749
  projectId: string;
1443
- /**
1444
- * Storage key/path
1445
- */
1446
- storageKey: string;
1447
1750
  };
1448
1751
  };
1449
1752
  };
1450
1753
 
1451
1754
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1452
1755
 
1453
- export type FetchPageContentData = {
1756
+ export type ScrapePageContentData = {
1454
1757
  body: {
1455
1758
  /**
1456
- * URL of the page to fetch
1759
+ * URL of the page to scrape
1457
1760
  */
1458
1761
  url: string;
1459
1762
  /**
1460
- * Viewport width in pixels
1763
+ * Only return the main content of the page excluding headers, navs, footers, etc.
1461
1764
  */
1462
- width?: number;
1765
+ onlyMainContent?: boolean;
1463
1766
  /**
1464
- * Viewport height in pixels
1767
+ * Emulate scraping from a mobile device
1465
1768
  */
1466
- height?: number;
1769
+ mobile?: boolean;
1467
1770
  /**
1468
- * Wait condition before capturing content
1771
+ * Fetch external CSS stylesheets and inline them as <style> tags for fully self-contained HTML
1469
1772
  */
1470
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
1773
+ inlineExternalCss?: boolean;
1471
1774
  /**
1472
- * User's Dazl ID (optional, for user identification)
1775
+ * Include structured branding/design system data (colors, fonts, typography, spacing, components)
1473
1776
  */
1474
- dazlId?: string;
1777
+ includeBranding?: boolean;
1475
1778
  };
1476
1779
  path?: never;
1477
1780
  query?: never;
1478
- url: '/capture/page-content';
1781
+ url: '/capture/scrape';
1479
1782
  };
1480
1783
 
1481
- export type FetchPageContentErrors = {
1784
+ export type ScrapePageContentErrors = {
1482
1785
  /**
1483
1786
  * Bad request - Invalid parameters or malformed JSON
1484
1787
  */
@@ -1489,9 +1792,7 @@ export type FetchPageContentErrors = {
1489
1792
  /**
1490
1793
  * Unauthorized
1491
1794
  */
1492
- 401: {
1493
- message: string;
1494
- };
1795
+ 401: ErrorResponse;
1495
1796
  /**
1496
1797
  * Forbidden - Permission denied
1497
1798
  */
@@ -1507,16 +1808,14 @@ export type FetchPageContentErrors = {
1507
1808
  /**
1508
1809
  * Internal server error
1509
1810
  */
1510
- 500: {
1511
- message: string;
1512
- };
1811
+ 500: ErrorResponse;
1513
1812
  };
1514
1813
 
1515
- export type FetchPageContentError = FetchPageContentErrors[keyof FetchPageContentErrors];
1814
+ export type ScrapePageContentError = ScrapePageContentErrors[keyof ScrapePageContentErrors];
1516
1815
 
1517
- export type FetchPageContentResponses = {
1816
+ export type ScrapePageContentResponses = {
1518
1817
  /**
1519
- * Page content fetched successfully
1818
+ * Page content scraped successfully
1520
1819
  */
1521
1820
  200: {
1522
1821
  /**
@@ -1524,167 +1823,65 @@ export type FetchPageContentResponses = {
1524
1823
  */
1525
1824
  success: boolean;
1526
1825
  /**
1527
- * Page HTML content
1826
+ * Cleaned HTML content of the page (processed for readability)
1528
1827
  */
1529
1828
  html: string;
1530
1829
  /**
1531
- * Captured CSS styles
1532
- */
1533
- styles: Array<{
1534
- /**
1535
- * URL of the CSS file
1536
- */
1537
- url: string;
1538
- /**
1539
- * CSS content
1540
- */
1541
- content: string;
1542
- }>;
1543
- /**
1544
- * Page content metadata
1545
- */
1546
- metadata: {
1547
- /**
1548
- * Original URL that was fetched
1549
- */
1550
- sourceUrl: string;
1551
- /**
1552
- * Viewport width used
1553
- */
1554
- width: number;
1555
- /**
1556
- * Viewport height used
1557
- */
1558
- height: number;
1559
- /**
1560
- * Wait condition used
1561
- */
1562
- waitUntil: string;
1563
- /**
1564
- * ISO timestamp of capture
1565
- */
1566
- timestamp: string;
1567
- /**
1568
- * Whether CSS styles were captured
1569
- */
1570
- stylesCaptured: boolean;
1571
- };
1572
- };
1573
- };
1574
-
1575
- export type FetchPageContentResponse = FetchPageContentResponses[keyof FetchPageContentResponses];
1576
-
1577
- export type ExtractDesignSystemData = {
1578
- body: {
1579
- /**
1580
- * URL of the page to analyze
1581
- */
1582
- url: string;
1583
- /**
1584
- * Capture in dark mode
1585
- */
1586
- darkMode?: boolean;
1587
- /**
1588
- * Use mobile viewport
1589
- */
1590
- mobile?: boolean;
1591
- /**
1592
- * Wait longer for slow sites
1593
- */
1594
- slow?: boolean;
1595
- /**
1596
- * Enable debug output
1597
- */
1598
- debug?: boolean;
1599
- /**
1600
- * Include verbose color information
1601
- */
1602
- verboseColors?: boolean;
1603
- /**
1604
- * User's Dazl ID (optional, for user identification)
1605
- */
1606
- dazlId?: string;
1607
- };
1608
- path?: never;
1609
- query?: never;
1610
- url: '/capture/design-system';
1611
- };
1612
-
1613
- export type ExtractDesignSystemErrors = {
1614
- /**
1615
- * Bad request - Invalid parameters or malformed JSON
1616
- */
1617
- 400: {
1618
- message: string;
1619
- issues?: string;
1620
- };
1621
- /**
1622
- * Unauthorized
1623
- */
1624
- 401: {
1625
- message: string;
1626
- };
1627
- /**
1628
- * Forbidden - Permission denied
1629
- */
1630
- 403: {
1631
- message: string;
1632
- };
1633
- /**
1634
- * Not found
1635
- */
1636
- 404: {
1637
- message: string;
1638
- };
1639
- /**
1640
- * Internal server error
1641
- */
1642
- 500: {
1643
- message: string;
1644
- };
1645
- };
1646
-
1647
- export type ExtractDesignSystemError = ExtractDesignSystemErrors[keyof ExtractDesignSystemErrors];
1648
-
1649
- export type ExtractDesignSystemResponses = {
1650
- /**
1651
- * Design system extracted successfully
1652
- */
1653
- 200: {
1654
- /**
1655
- * Whether the operation succeeded
1830
+ * Raw HTML content of the page as-is
1656
1831
  */
1657
- success: boolean;
1832
+ rawHtml: string;
1658
1833
  /**
1659
- * Design system data
1834
+ * Page metadata
1660
1835
  */
1661
- data: {
1662
- [key: string]: unknown;
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;
1663
1845
  };
1664
1846
  /**
1665
- * Design system metadata
1847
+ * Structured branding/design system data (when includeBranding is true)
1666
1848
  */
1667
- metadata: {
1668
- /**
1669
- * Original URL that was analyzed
1670
- */
1671
- sourceUrl: string;
1672
- /**
1673
- * ISO timestamp of analysis
1674
- */
1675
- timestamp: string;
1676
- /**
1677
- * Options used for analysis
1678
- */
1679
- options: {
1680
- darkMode: boolean;
1681
- mobile: boolean;
1682
- slow: boolean;
1683
- debug: boolean;
1684
- verboseColors: boolean;
1685
- };
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;
1686
1883
  };
1687
1884
  };
1688
1885
  };
1689
1886
 
1690
- export type ExtractDesignSystemResponse = ExtractDesignSystemResponses[keyof ExtractDesignSystemResponses];
1887
+ export type ScrapePageContentResponse = ScrapePageContentResponses[keyof ScrapePageContentResponses];