@dazl/internal-api-client 1.2.0 → 1.3.1

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,12 @@ export type ClientOptions = {
4
4
  baseUrl: `${string}://${string}` | (string & {});
5
5
  };
6
6
 
7
+ export type BillingProduct = {
8
+ prices: Array<BillingPrice>;
9
+ product: StripeProduct;
10
+ isDefaultFree?: boolean;
11
+ };
12
+
7
13
  export type BillingPrice = {
8
14
  credits: number;
9
15
  priceCents: number;
@@ -37,22 +43,6 @@ export type StripeProduct = {
37
43
  url: string | null;
38
44
  };
39
45
 
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
46
  export type CustomerInfo = {
57
47
  productId: string;
58
48
  credits: number;
@@ -70,6 +60,16 @@ export type CustomerInfo = {
70
60
  hasEarlyAccessCoupon: boolean;
71
61
  };
72
62
 
63
+ export type ScheduledUpdate = {
64
+ type: 'downgrade';
65
+ scheduleId: string;
66
+ targetPriceId: string;
67
+ updateTime: number;
68
+ } | {
69
+ type: 'cancel';
70
+ updateTime: number;
71
+ };
72
+
73
73
  export type UploadConfiguration = {
74
74
  /**
75
75
  * Presigned URL for uploading the file
@@ -81,6 +81,17 @@ export type UploadConfiguration = {
81
81
  uploadToken?: string;
82
82
  };
83
83
 
84
+ export type MediaFileList = {
85
+ /**
86
+ * Token for fetching the next page, undefined if no more pages
87
+ */
88
+ nextPageToken?: string;
89
+ /**
90
+ * Array of file descriptors
91
+ */
92
+ files: Array<MediaFile>;
93
+ };
94
+
84
95
  export type MediaFile = {
85
96
  /**
86
97
  * Unique file identifier
@@ -120,17 +131,6 @@ export type MediaFile = {
120
131
  dateUpdated: string;
121
132
  };
122
133
 
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
134
  export type ProjectWithScreenshot = {
135
135
  /**
136
136
  * Project identifier
@@ -217,6 +217,124 @@ export type Screenshot = {
217
217
  createdAt: string;
218
218
  };
219
219
 
220
+ export type GetByDazlIdData = {
221
+ body?: never;
222
+ path: {
223
+ dazlId: string;
224
+ };
225
+ query?: never;
226
+ url: '/user-settings/{dazlId}';
227
+ };
228
+
229
+ export type GetByDazlIdErrors = {
230
+ /**
231
+ * Bad request - Invalid parameters or malformed JSON
232
+ */
233
+ 400: {
234
+ message: string;
235
+ issues?: string;
236
+ };
237
+ /**
238
+ * Unauthorized
239
+ */
240
+ 401: {
241
+ message: string;
242
+ };
243
+ /**
244
+ * Forbidden
245
+ */
246
+ 403: {
247
+ message: string;
248
+ };
249
+ /**
250
+ * Not Found
251
+ */
252
+ 404: {
253
+ message: string;
254
+ };
255
+ /**
256
+ * Internal server error
257
+ */
258
+ 500: {
259
+ message: string;
260
+ };
261
+ };
262
+
263
+ export type GetByDazlIdError = GetByDazlIdErrors[keyof GetByDazlIdErrors];
264
+
265
+ export type GetByDazlIdResponses = {
266
+ /**
267
+ * Returns user settings (empty object if none exist)
268
+ */
269
+ 200: {
270
+ settings: {
271
+ [key: string]: unknown;
272
+ };
273
+ };
274
+ };
275
+
276
+ export type GetByDazlIdResponse = GetByDazlIdResponses[keyof GetByDazlIdResponses];
277
+
278
+ export type UpdateByDazlIdData = {
279
+ body: {
280
+ settings: {
281
+ [key: string]: unknown;
282
+ };
283
+ };
284
+ path: {
285
+ dazlId: string;
286
+ };
287
+ query?: never;
288
+ url: '/user-settings/{dazlId}';
289
+ };
290
+
291
+ export type UpdateByDazlIdErrors = {
292
+ /**
293
+ * Bad request - Invalid parameters or malformed JSON
294
+ */
295
+ 400: {
296
+ message: string;
297
+ issues?: string;
298
+ };
299
+ /**
300
+ * Unauthorized
301
+ */
302
+ 401: {
303
+ message: string;
304
+ };
305
+ /**
306
+ * Forbidden
307
+ */
308
+ 403: {
309
+ message: string;
310
+ };
311
+ /**
312
+ * Not Found
313
+ */
314
+ 404: {
315
+ message: string;
316
+ };
317
+ /**
318
+ * Internal server error
319
+ */
320
+ 500: {
321
+ message: string;
322
+ };
323
+ };
324
+
325
+ export type UpdateByDazlIdError = UpdateByDazlIdErrors[keyof UpdateByDazlIdErrors];
326
+
327
+ export type UpdateByDazlIdResponses = {
328
+ /**
329
+ * Settings updated successfully
330
+ */
331
+ 200: {
332
+ success: boolean;
333
+ };
334
+ };
335
+
336
+ export type UpdateByDazlIdResponse = UpdateByDazlIdResponses[keyof UpdateByDazlIdResponses];
337
+
220
338
  export type GetBalanceByDazlIdData = {
221
339
  body?: never;
222
340
  path: {
@@ -268,9 +386,9 @@ export type GetBalanceByDazlIdResponses = {
268
386
  */
269
387
  200: {
270
388
  balance: number;
271
- productId?: string;
272
- priceId?: string;
273
- isSubscriptionFree?: boolean;
389
+ productId: string | null;
390
+ priceId: string | null;
391
+ isSubscriptionFree: boolean | null;
274
392
  };
275
393
  };
276
394
 
@@ -1091,7 +1209,12 @@ export type CreateMediaResponses = {
1091
1209
  export type GetAccountScreenshotsData = {
1092
1210
  body?: never;
1093
1211
  path?: never;
1094
- query?: never;
1212
+ query?: {
1213
+ /**
1214
+ * User's Dazl ID (required for internal API calls without authentication)
1215
+ */
1216
+ dazlId?: string;
1217
+ };
1095
1218
  url: '/media/account-screenshots';
1096
1219
  };
1097
1220
 
@@ -1148,6 +1271,10 @@ export type GetProjectScreenshotsData = {
1148
1271
  * Project identifier
1149
1272
  */
1150
1273
  projectId: string;
1274
+ /**
1275
+ * User's Dazl ID (required for internal API calls without authentication)
1276
+ */
1277
+ dazlId?: string;
1151
1278
  };
1152
1279
  url: '/media/project-screenshots';
1153
1280
  };
@@ -1289,11 +1416,7 @@ export type TakeScreenshotResponses = {
1289
1416
  /**
1290
1417
  * Public URL of the screenshot
1291
1418
  */
1292
- imageUrl: string;
1293
- /**
1294
- * Storage provider used
1295
- */
1296
- storageProvider: string;
1419
+ publicUrl: string;
1297
1420
  /**
1298
1421
  * Screenshot metadata
1299
1422
  */
@@ -1322,251 +1445,8 @@ export type TakeScreenshotResponses = {
1322
1445
  * Associated project ID
1323
1446
  */
1324
1447
  projectId: string;
1325
- /**
1326
- * Storage key/path
1327
- */
1328
- storageKey: string;
1329
1448
  };
1330
1449
  };
1331
1450
  };
1332
1451
 
1333
1452
  export type TakeScreenshotResponse = TakeScreenshotResponses[keyof TakeScreenshotResponses];
1334
-
1335
- export type FetchPageContentData = {
1336
- body: {
1337
- /**
1338
- * URL of the page to fetch
1339
- */
1340
- url: string;
1341
- /**
1342
- * Viewport width in pixels
1343
- */
1344
- width?: number;
1345
- /**
1346
- * Viewport height in pixels
1347
- */
1348
- height?: number;
1349
- /**
1350
- * Wait condition before capturing content
1351
- */
1352
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
1353
- /**
1354
- * User's Dazl ID (optional, for user identification)
1355
- */
1356
- dazlId?: string;
1357
- };
1358
- path?: never;
1359
- query?: never;
1360
- url: '/capture/page-content';
1361
- };
1362
-
1363
- export type FetchPageContentErrors = {
1364
- /**
1365
- * Bad request - Invalid parameters or malformed JSON
1366
- */
1367
- 400: {
1368
- message: string;
1369
- issues?: string;
1370
- };
1371
- /**
1372
- * Unauthorized
1373
- */
1374
- 401: {
1375
- message: string;
1376
- };
1377
- /**
1378
- * Forbidden - Permission denied
1379
- */
1380
- 403: {
1381
- message: string;
1382
- };
1383
- /**
1384
- * Not found
1385
- */
1386
- 404: {
1387
- message: string;
1388
- };
1389
- /**
1390
- * Internal server error
1391
- */
1392
- 500: {
1393
- message: string;
1394
- };
1395
- };
1396
-
1397
- export type FetchPageContentError = FetchPageContentErrors[keyof FetchPageContentErrors];
1398
-
1399
- export type FetchPageContentResponses = {
1400
- /**
1401
- * Page content fetched successfully
1402
- */
1403
- 200: {
1404
- /**
1405
- * Whether the operation succeeded
1406
- */
1407
- success: boolean;
1408
- /**
1409
- * Page HTML content
1410
- */
1411
- html: string;
1412
- /**
1413
- * Captured CSS styles
1414
- */
1415
- styles: Array<{
1416
- /**
1417
- * URL of the CSS file
1418
- */
1419
- url: string;
1420
- /**
1421
- * CSS content
1422
- */
1423
- content: string;
1424
- }>;
1425
- /**
1426
- * Page content metadata
1427
- */
1428
- metadata: {
1429
- /**
1430
- * Original URL that was fetched
1431
- */
1432
- sourceUrl: string;
1433
- /**
1434
- * Viewport width used
1435
- */
1436
- width: number;
1437
- /**
1438
- * Viewport height used
1439
- */
1440
- height: number;
1441
- /**
1442
- * Wait condition used
1443
- */
1444
- waitUntil: string;
1445
- /**
1446
- * ISO timestamp of capture
1447
- */
1448
- timestamp: string;
1449
- /**
1450
- * Whether CSS styles were captured
1451
- */
1452
- stylesCaptured: boolean;
1453
- };
1454
- };
1455
- };
1456
-
1457
- export type FetchPageContentResponse = FetchPageContentResponses[keyof FetchPageContentResponses];
1458
-
1459
- export type ExtractDesignSystemData = {
1460
- body: {
1461
- /**
1462
- * URL of the page to analyze
1463
- */
1464
- url: string;
1465
- /**
1466
- * Capture in dark mode
1467
- */
1468
- darkMode?: boolean;
1469
- /**
1470
- * Use mobile viewport
1471
- */
1472
- mobile?: boolean;
1473
- /**
1474
- * Wait longer for slow sites
1475
- */
1476
- slow?: boolean;
1477
- /**
1478
- * Enable debug output
1479
- */
1480
- debug?: boolean;
1481
- /**
1482
- * Include verbose color information
1483
- */
1484
- verboseColors?: boolean;
1485
- /**
1486
- * User's Dazl ID (optional, for user identification)
1487
- */
1488
- dazlId?: string;
1489
- };
1490
- path?: never;
1491
- query?: never;
1492
- url: '/capture/design-system';
1493
- };
1494
-
1495
- export type ExtractDesignSystemErrors = {
1496
- /**
1497
- * Bad request - Invalid parameters or malformed JSON
1498
- */
1499
- 400: {
1500
- message: string;
1501
- issues?: string;
1502
- };
1503
- /**
1504
- * Unauthorized
1505
- */
1506
- 401: {
1507
- message: string;
1508
- };
1509
- /**
1510
- * Forbidden - Permission denied
1511
- */
1512
- 403: {
1513
- message: string;
1514
- };
1515
- /**
1516
- * Not found
1517
- */
1518
- 404: {
1519
- message: string;
1520
- };
1521
- /**
1522
- * Internal server error
1523
- */
1524
- 500: {
1525
- message: string;
1526
- };
1527
- };
1528
-
1529
- export type ExtractDesignSystemError = ExtractDesignSystemErrors[keyof ExtractDesignSystemErrors];
1530
-
1531
- export type ExtractDesignSystemResponses = {
1532
- /**
1533
- * Design system extracted successfully
1534
- */
1535
- 200: {
1536
- /**
1537
- * Whether the operation succeeded
1538
- */
1539
- success: boolean;
1540
- /**
1541
- * Design system data
1542
- */
1543
- data: {
1544
- [key: string]: unknown;
1545
- };
1546
- /**
1547
- * Design system metadata
1548
- */
1549
- metadata: {
1550
- /**
1551
- * Original URL that was analyzed
1552
- */
1553
- sourceUrl: string;
1554
- /**
1555
- * ISO timestamp of analysis
1556
- */
1557
- timestamp: string;
1558
- /**
1559
- * Options used for analysis
1560
- */
1561
- options: {
1562
- darkMode: boolean;
1563
- mobile: boolean;
1564
- slow: boolean;
1565
- debug: boolean;
1566
- verboseColors: boolean;
1567
- };
1568
- };
1569
- };
1570
- };
1571
-
1572
- export type ExtractDesignSystemResponse = ExtractDesignSystemResponses[keyof ExtractDesignSystemResponses];