@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.
@@ -1,6 +1,14 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
+ export type ErrorResponse = {
5
+ message: string;
6
+ };
7
+ export type BillingProduct = {
8
+ prices: Array<BillingPrice>;
9
+ product: StripeProduct;
10
+ isDefaultFree?: boolean;
11
+ };
4
12
  export type BillingPrice = {
5
13
  credits: number;
6
14
  priceCents: number;
@@ -32,20 +40,6 @@ export type StripeProduct = {
32
40
  type: 'service';
33
41
  url: string | null;
34
42
  };
35
- export type BillingProduct = {
36
- prices: Array<BillingPrice>;
37
- product: StripeProduct;
38
- isDefaultFree?: boolean;
39
- };
40
- export type ScheduledUpdate = {
41
- type: 'downgrade';
42
- scheduleId: string;
43
- targetPriceId: string;
44
- updateTime: number;
45
- } | {
46
- type: 'cancel';
47
- updateTime: number;
48
- };
49
43
  export type CustomerInfo = {
50
44
  productId: string;
51
45
  credits: number;
@@ -62,6 +56,36 @@ export type CustomerInfo = {
62
56
  customerId: string;
63
57
  hasEarlyAccessCoupon: boolean;
64
58
  };
59
+ export type ScheduledUpdate = {
60
+ type: 'downgrade';
61
+ scheduleId: string;
62
+ targetPriceId: string;
63
+ updateTime: number;
64
+ } | {
65
+ type: 'cancel';
66
+ updateTime: number;
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
@@ -72,6 +96,16 @@ export type UploadConfiguration = {
72
96
  */
73
97
  uploadToken?: string;
74
98
  };
99
+ export type MediaFileList = {
100
+ /**
101
+ * Token for fetching the next page, undefined if no more pages
102
+ */
103
+ nextPageToken?: string;
104
+ /**
105
+ * Array of file descriptors
106
+ */
107
+ files: Array<MediaFile>;
108
+ };
75
109
  export type MediaFile = {
76
110
  /**
77
111
  * Unique file identifier
@@ -110,16 +144,6 @@ export type MediaFile = {
110
144
  */
111
145
  dateUpdated: string;
112
146
  };
113
- export type MediaFileList = {
114
- /**
115
- * Token for fetching the next page, undefined if no more pages
116
- */
117
- nextPageToken?: string;
118
- /**
119
- * Array of file descriptors
120
- */
121
- files: Array<MediaFile>;
122
- };
123
147
  export type ProjectWithScreenshot = {
124
148
  /**
125
149
  * Project identifier
@@ -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 = {
@@ -360,9 +360,9 @@ export type GetBalanceByDazlIdResponses = {
360
360
  */
361
361
  200: {
362
362
  balance: number;
363
- productId?: string;
364
- priceId?: string;
365
- isSubscriptionFree?: boolean;
363
+ productId: string | null;
364
+ priceId: string | null;
365
+ isSubscriptionFree: boolean | null;
366
366
  };
367
367
  };
368
368
  export type GetBalanceByDazlIdResponse = GetBalanceByDazlIdResponses[keyof 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,38 +809,20 @@ export type GetUserInfoByDazlIdResponses = {
889
809
  };
890
810
  };
891
811
  export type GetUserInfoByDazlIdResponse = GetUserInfoByDazlIdResponses[keyof GetUserInfoByDazlIdResponses];
892
- export type GetUploadConfigurationData = {
812
+ export type EnsureSiteIdData = {
893
813
  body: {
894
- /**
895
- * File path within the project
896
- */
897
- path: string;
898
- /**
899
- * Project identifier
900
- */
901
814
  projectId: string;
815
+ projectName: string;
902
816
  /**
903
- * MIME type of the file to upload
904
- */
905
- mimeType?: string;
906
- /**
907
- * Access control level for the file
908
- */
909
- acl?: 'public' | 'private';
910
- /**
911
- * Callback URL to notify after upload completion
912
- */
913
- callback?: string;
914
- /**
915
- * Upload protocol to use
817
+ * Dazl ID of the project owner to verify ownership
916
818
  */
917
- protocol?: 'tus';
819
+ dazlId?: string;
918
820
  };
919
821
  path?: never;
920
822
  query?: never;
921
- url: '/media/upload-configuration';
823
+ url: '/publish/site-id';
922
824
  };
923
- export type GetUploadConfigurationErrors = {
825
+ export type EnsureSiteIdErrors = {
924
826
  /**
925
827
  * Bad request - Invalid parameters or malformed JSON
926
828
  */
@@ -931,61 +833,437 @@ export type GetUploadConfigurationErrors = {
931
833
  /**
932
834
  * Unauthorized
933
835
  */
934
- 401: {
935
- message: string;
936
- };
836
+ 401: ErrorResponse;
937
837
  /**
938
- * Forbidden - Permission denied
838
+ * Forbidden
939
839
  */
940
- 403: {
941
- message: string;
942
- };
840
+ 403: ErrorResponse;
943
841
  /**
944
- * Not found
842
+ * Not Found
945
843
  */
946
- 404: {
947
- message: string;
948
- };
844
+ 404: ErrorResponse;
949
845
  /**
950
846
  * Internal server error
951
847
  */
952
- 500: {
953
- message: string;
954
- };
848
+ 500: ErrorResponse;
955
849
  };
956
- export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
957
- export type GetUploadConfigurationResponses = {
850
+ export type EnsureSiteIdError = EnsureSiteIdErrors[keyof EnsureSiteIdErrors];
851
+ export type EnsureSiteIdResponses = {
958
852
  /**
959
- * Returns presigned upload URL and configuration
853
+ * Returns the Netlify site ID for the given project, creates one when missing
960
854
  */
961
- 200: UploadConfiguration;
855
+ 200: {
856
+ siteId: string;
857
+ };
962
858
  };
963
- export type GetUploadConfigurationResponse = GetUploadConfigurationResponses[keyof GetUploadConfigurationResponses];
964
- export type ListFilesData = {
859
+ export type EnsureSiteIdResponse = EnsureSiteIdResponses[keyof EnsureSiteIdResponses];
860
+ export type GetLatestDeployData = {
965
861
  body?: never;
966
862
  path?: never;
967
863
  query: {
968
- /**
969
- * Project identifier
970
- */
971
864
  projectId: string;
972
- /**
973
- * Path within the project to list files from
974
- */
975
- path?: string;
976
- /**
977
- * Filter by type: '-' for files, 'd' for directories
978
- */
979
- type?: '-' | 'd';
980
- /**
981
- * Field to order results by
982
- */
983
- orderBy?: 'dateUpdated' | 'name';
984
- /**
985
- * Sort direction
986
- */
987
- orderDirection?: 'asc' | 'desc';
988
- /**
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];
1174
+ export type GetUploadConfigurationData = {
1175
+ body: {
1176
+ /**
1177
+ * File path within the project
1178
+ */
1179
+ path: string;
1180
+ /**
1181
+ * Project identifier
1182
+ */
1183
+ projectId: string;
1184
+ /**
1185
+ * MIME type of the file to upload
1186
+ */
1187
+ mimeType?: string;
1188
+ /**
1189
+ * Access control level for the file
1190
+ */
1191
+ acl?: 'public' | 'private';
1192
+ /**
1193
+ * Callback URL to notify after upload completion
1194
+ */
1195
+ callback?: string;
1196
+ /**
1197
+ * Upload protocol to use
1198
+ */
1199
+ protocol?: 'tus';
1200
+ };
1201
+ path?: never;
1202
+ query?: never;
1203
+ url: '/media/upload-configuration';
1204
+ };
1205
+ export type GetUploadConfigurationErrors = {
1206
+ /**
1207
+ * Bad request - Invalid parameters or malformed JSON
1208
+ */
1209
+ 400: {
1210
+ message: string;
1211
+ issues?: string;
1212
+ };
1213
+ /**
1214
+ * Unauthorized
1215
+ */
1216
+ 401: ErrorResponse;
1217
+ /**
1218
+ * Forbidden - Permission denied
1219
+ */
1220
+ 403: {
1221
+ message: string;
1222
+ };
1223
+ /**
1224
+ * Not found
1225
+ */
1226
+ 404: {
1227
+ message: string;
1228
+ };
1229
+ /**
1230
+ * Internal server error
1231
+ */
1232
+ 500: ErrorResponse;
1233
+ };
1234
+ export type GetUploadConfigurationError = GetUploadConfigurationErrors[keyof GetUploadConfigurationErrors];
1235
+ export type GetUploadConfigurationResponses = {
1236
+ /**
1237
+ * Returns presigned upload URL and configuration
1238
+ */
1239
+ 200: UploadConfiguration;
1240
+ };
1241
+ export type GetUploadConfigurationResponse = GetUploadConfigurationResponses[keyof GetUploadConfigurationResponses];
1242
+ export type ListFilesData = {
1243
+ body?: never;
1244
+ path?: never;
1245
+ query: {
1246
+ /**
1247
+ * Project identifier
1248
+ */
1249
+ projectId: string;
1250
+ /**
1251
+ * Path within the project to list files from
1252
+ */
1253
+ path?: string;
1254
+ /**
1255
+ * Filter by type: '-' for files, 'd' for directories
1256
+ */
1257
+ type?: '-' | 'd';
1258
+ /**
1259
+ * Field to order results by
1260
+ */
1261
+ orderBy?: 'dateUpdated' | 'name';
1262
+ /**
1263
+ * Sort direction
1264
+ */
1265
+ orderDirection?: 'asc' | 'desc';
1266
+ /**
989
1267
  * Number of items per page
990
1268
  */
991
1269
  pageSize?: number;
@@ -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 = {
@@ -1117,7 +1387,12 @@ export type CreateMediaResponses = {
1117
1387
  export type GetAccountScreenshotsData = {
1118
1388
  body?: never;
1119
1389
  path?: never;
1120
- query?: never;
1390
+ query?: {
1391
+ /**
1392
+ * User's Dazl ID (required for internal API calls without authentication)
1393
+ */
1394
+ dazlId?: string;
1395
+ };
1121
1396
  url: '/media/account-screenshots';
1122
1397
  };
1123
1398
  export type GetAccountScreenshotsErrors = {
@@ -1131,9 +1406,7 @@ export type GetAccountScreenshotsErrors = {
1131
1406
  /**
1132
1407
  * Unauthorized
1133
1408
  */
1134
- 401: {
1135
- message: string;
1136
- };
1409
+ 401: ErrorResponse;
1137
1410
  /**
1138
1411
  * Forbidden - Permission denied
1139
1412
  */
@@ -1149,9 +1422,7 @@ export type GetAccountScreenshotsErrors = {
1149
1422
  /**
1150
1423
  * Internal server error
1151
1424
  */
1152
- 500: {
1153
- message: string;
1154
- };
1425
+ 500: ErrorResponse;
1155
1426
  };
1156
1427
  export type GetAccountScreenshotsError = GetAccountScreenshotsErrors[keyof GetAccountScreenshotsErrors];
1157
1428
  export type GetAccountScreenshotsResponses = {
@@ -1169,6 +1440,10 @@ export type GetProjectScreenshotsData = {
1169
1440
  * Project identifier
1170
1441
  */
1171
1442
  projectId: string;
1443
+ /**
1444
+ * User's Dazl ID (required for internal API calls without authentication)
1445
+ */
1446
+ dazlId?: string;
1172
1447
  };
1173
1448
  url: '/media/project-screenshots';
1174
1449
  };
@@ -1183,9 +1458,7 @@ export type GetProjectScreenshotsErrors = {
1183
1458
  /**
1184
1459
  * Unauthorized
1185
1460
  */
1186
- 401: {
1187
- message: string;
1188
- };
1461
+ 401: ErrorResponse;
1189
1462
  /**
1190
1463
  * Forbidden - Permission denied
1191
1464
  */
@@ -1201,9 +1474,7 @@ export type GetProjectScreenshotsErrors = {
1201
1474
  /**
1202
1475
  * Internal server error
1203
1476
  */
1204
- 500: {
1205
- message: string;
1206
- };
1477
+ 500: ErrorResponse;
1207
1478
  };
1208
1479
  export type GetProjectScreenshotsError = GetProjectScreenshotsErrors[keyof GetProjectScreenshotsErrors];
1209
1480
  export type GetProjectScreenshotsResponses = {
@@ -1263,9 +1534,7 @@ export type TakeScreenshotErrors = {
1263
1534
  /**
1264
1535
  * Unauthorized
1265
1536
  */
1266
- 401: {
1267
- message: string;
1268
- };
1537
+ 401: ErrorResponse;
1269
1538
  /**
1270
1539
  * Forbidden - Permission denied
1271
1540
  */
@@ -1281,9 +1550,7 @@ export type TakeScreenshotErrors = {
1281
1550
  /**
1282
1551
  * Internal server error
1283
1552
  */
1284
- 500: {
1285
- message: string;
1286
- };
1553
+ 500: ErrorResponse;
1287
1554
  };
1288
1555
  export type TakeScreenshotError = TakeScreenshotErrors[keyof TakeScreenshotErrors];
1289
1556
  export type TakeScreenshotResponses = {
@@ -1302,11 +1569,7 @@ export type TakeScreenshotResponses = {
1302
1569
  /**
1303
1570
  * Public URL of the screenshot
1304
1571
  */
1305
- imageUrl: string;
1306
- /**
1307
- * Storage provider used
1308
- */
1309
- storageProvider: string;
1572
+ publicUrl: string;
1310
1573
  /**
1311
1574
  * Screenshot metadata
1312
1575
  */
@@ -1335,42 +1598,38 @@ export type TakeScreenshotResponses = {
1335
1598
  * Associated project ID
1336
1599
  */
1337
1600
  projectId: string;
1338
- /**
1339
- * Storage key/path
1340
- */
1341
- storageKey: string;
1342
1601
  };
1343
1602
  };
1344
1603
  };
1345
1604
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1346
- export type FetchPageContentData = {
1605
+ export type ScrapePageContentData = {
1347
1606
  body: {
1348
1607
  /**
1349
- * URL of the page to fetch
1608
+ * URL of the page to scrape
1350
1609
  */
1351
1610
  url: string;
1352
1611
  /**
1353
- * Viewport width in pixels
1612
+ * Only return the main content of the page excluding headers, navs, footers, etc.
1354
1613
  */
1355
- width?: number;
1614
+ onlyMainContent?: boolean;
1356
1615
  /**
1357
- * Viewport height in pixels
1616
+ * Emulate scraping from a mobile device
1358
1617
  */
1359
- height?: number;
1618
+ mobile?: boolean;
1360
1619
  /**
1361
- * Wait condition before capturing content
1620
+ * Fetch external CSS stylesheets and inline them as <style> tags for fully self-contained HTML
1362
1621
  */
1363
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
1622
+ inlineExternalCss?: boolean;
1364
1623
  /**
1365
- * User's Dazl ID (optional, for user identification)
1624
+ * Include structured branding/design system data (colors, fonts, typography, spacing, components)
1366
1625
  */
1367
- dazlId?: string;
1626
+ includeBranding?: boolean;
1368
1627
  };
1369
1628
  path?: never;
1370
1629
  query?: never;
1371
- url: '/capture/page-content';
1630
+ url: '/capture/scrape';
1372
1631
  };
1373
- export type FetchPageContentErrors = {
1632
+ export type ScrapePageContentErrors = {
1374
1633
  /**
1375
1634
  * Bad request - Invalid parameters or malformed JSON
1376
1635
  */
@@ -1381,9 +1640,7 @@ export type FetchPageContentErrors = {
1381
1640
  /**
1382
1641
  * Unauthorized
1383
1642
  */
1384
- 401: {
1385
- message: string;
1386
- };
1643
+ 401: ErrorResponse;
1387
1644
  /**
1388
1645
  * Forbidden - Permission denied
1389
1646
  */
@@ -1399,14 +1656,12 @@ export type FetchPageContentErrors = {
1399
1656
  /**
1400
1657
  * Internal server error
1401
1658
  */
1402
- 500: {
1403
- message: string;
1404
- };
1659
+ 500: ErrorResponse;
1405
1660
  };
1406
- export type FetchPageContentError = FetchPageContentErrors[keyof FetchPageContentErrors];
1407
- export type FetchPageContentResponses = {
1661
+ export type ScrapePageContentError = ScrapePageContentErrors[keyof ScrapePageContentErrors];
1662
+ export type ScrapePageContentResponses = {
1408
1663
  /**
1409
- * Page content fetched successfully
1664
+ * Page content scraped successfully
1410
1665
  */
1411
1666
  200: {
1412
1667
  /**
@@ -1414,162 +1669,65 @@ export type FetchPageContentResponses = {
1414
1669
  */
1415
1670
  success: boolean;
1416
1671
  /**
1417
- * Page HTML content
1672
+ * Cleaned HTML content of the page (processed for readability)
1418
1673
  */
1419
1674
  html: string;
1420
1675
  /**
1421
- * Captured CSS styles
1676
+ * Raw HTML content of the page as-is
1422
1677
  */
1423
- styles: Array<{
1424
- /**
1425
- * URL of the CSS file
1426
- */
1427
- url: string;
1428
- /**
1429
- * CSS content
1430
- */
1431
- content: string;
1432
- }>;
1678
+ rawHtml: string;
1433
1679
  /**
1434
- * Page content metadata
1680
+ * Page metadata
1435
1681
  */
1436
- metadata: {
1437
- /**
1438
- * Original URL that was fetched
1439
- */
1440
- sourceUrl: string;
1441
- /**
1442
- * Viewport width used
1443
- */
1444
- width: number;
1445
- /**
1446
- * Viewport height used
1447
- */
1448
- height: number;
1449
- /**
1450
- * Wait condition used
1451
- */
1452
- waitUntil: string;
1453
- /**
1454
- * ISO timestamp of capture
1455
- */
1456
- timestamp: string;
1457
- /**
1458
- * Whether CSS styles were captured
1459
- */
1460
- stylesCaptured: boolean;
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;
1461
1691
  };
1462
- };
1463
- };
1464
- export type FetchPageContentResponse = FetchPageContentResponses[keyof FetchPageContentResponses];
1465
- export type ExtractDesignSystemData = {
1466
- body: {
1467
- /**
1468
- * URL of the page to analyze
1469
- */
1470
- url: string;
1471
- /**
1472
- * Capture in dark mode
1473
- */
1474
- darkMode?: boolean;
1475
- /**
1476
- * Use mobile viewport
1477
- */
1478
- mobile?: boolean;
1479
- /**
1480
- * Wait longer for slow sites
1481
- */
1482
- slow?: boolean;
1483
- /**
1484
- * Enable debug output
1485
- */
1486
- debug?: boolean;
1487
1692
  /**
1488
- * Include verbose color information
1693
+ * Structured branding/design system data (when includeBranding is true)
1489
1694
  */
1490
- verboseColors?: boolean;
1491
- /**
1492
- * User's Dazl ID (optional, for user identification)
1493
- */
1494
- dazlId?: string;
1495
- };
1496
- path?: never;
1497
- query?: never;
1498
- url: '/capture/design-system';
1499
- };
1500
- export type ExtractDesignSystemErrors = {
1501
- /**
1502
- * Bad request - Invalid parameters or malformed JSON
1503
- */
1504
- 400: {
1505
- message: string;
1506
- issues?: string;
1507
- };
1508
- /**
1509
- * Unauthorized
1510
- */
1511
- 401: {
1512
- message: string;
1513
- };
1514
- /**
1515
- * Forbidden - Permission denied
1516
- */
1517
- 403: {
1518
- message: string;
1519
- };
1520
- /**
1521
- * Not found
1522
- */
1523
- 404: {
1524
- message: string;
1525
- };
1526
- /**
1527
- * Internal server error
1528
- */
1529
- 500: {
1530
- message: string;
1531
- };
1532
- };
1533
- export type ExtractDesignSystemError = ExtractDesignSystemErrors[keyof ExtractDesignSystemErrors];
1534
- export type ExtractDesignSystemResponses = {
1535
- /**
1536
- * Design system extracted successfully
1537
- */
1538
- 200: {
1539
- /**
1540
- * Whether the operation succeeded
1541
- */
1542
- success: boolean;
1543
- /**
1544
- * Design system data
1545
- */
1546
- data: {
1547
- [key: string]: unknown;
1548
- };
1549
- /**
1550
- * Design system metadata
1551
- */
1552
- metadata: {
1553
- /**
1554
- * Original URL that was analyzed
1555
- */
1556
- sourceUrl: string;
1557
- /**
1558
- * ISO timestamp of analysis
1559
- */
1560
- timestamp: string;
1561
- /**
1562
- * Options used for analysis
1563
- */
1564
- options: {
1565
- darkMode: boolean;
1566
- mobile: boolean;
1567
- slow: boolean;
1568
- debug: boolean;
1569
- verboseColors: boolean;
1570
- };
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;
1571
1729
  };
1572
1730
  };
1573
1731
  };
1574
- export type ExtractDesignSystemResponse = ExtractDesignSystemResponses[keyof ExtractDesignSystemResponses];
1732
+ export type ScrapePageContentResponse = ScrapePageContentResponses[keyof ScrapePageContentResponses];
1575
1733
  //# sourceMappingURL=types.gen.d.ts.map