@dazl/internal-api-client 1.8.0 → 1.10.0

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
@@ -89,11 +89,24 @@ export type ProjectRaw = {
89
89
  id: string;
90
90
  name: string;
91
91
  userId: number;
92
+ dazlUserId: string | null;
92
93
  createdAt: string;
93
94
  lastOpenedAt: string | null;
94
95
  latestScreenshot: string | null;
95
96
  originTemplateId: string | null;
96
97
  archivedAt: string | null;
98
+ members: Array<{
99
+ role: 'admin' | 'contributor' | 'viewer';
100
+ type: 'user';
101
+ /**
102
+ * Dazl ID for the type = "user"
103
+ */
104
+ id: string;
105
+ /**
106
+ * Time when it was updated in milliseconds since epoch
107
+ */
108
+ updatedAt?: number;
109
+ }>;
97
110
  };
98
111
 
99
112
  export type OwnerDazlId = {
@@ -133,52 +146,54 @@ export type UploadConfiguration = {
133
146
 
134
147
  export type MediaFileList = {
135
148
  /**
136
- * Token for fetching the next page, undefined if no more pages
149
+ * Array of media items
150
+ */
151
+ items: Array<MediaItem>;
152
+ /**
153
+ * Cursor token for fetching the next page, null if no more pages
137
154
  */
138
- nextPageToken?: string;
155
+ nextCursor: string | null;
139
156
  /**
140
- * Array of file descriptors
157
+ * Total number of matching items (independent of pagination)
141
158
  */
142
- files: Array<MediaFile>;
159
+ total: number;
143
160
  };
144
161
 
145
- export type MediaFile = {
162
+ export type MediaItem = {
146
163
  /**
147
- * Unique file identifier
164
+ * Unique media identifier
148
165
  */
149
166
  id: string;
150
- /**
151
- * File path within the project
152
- */
153
- path: string;
154
167
  /**
155
168
  * MIME type of the file
156
169
  */
157
170
  mimeType: string;
158
171
  /**
159
- * File type: '-' for file, 'd' for directory
172
+ * URL where the file is accessible
160
173
  */
161
- type: '-' | 'd';
174
+ url: string;
162
175
  /**
163
- * File size in bytes, null for directories
176
+ * Project identifier
164
177
  */
165
- size: number | null;
178
+ projectId: string;
166
179
  /**
167
- * Access control level of the file
180
+ * Git commit hash, null if not a screenshot
168
181
  */
169
- acl: 'public' | 'private';
182
+ gitCommit: string | null;
170
183
  /**
171
- * Content hash of the file
184
+ * Additional metadata
172
185
  */
173
- hash: string | null;
186
+ descriptor: {
187
+ [key: string]: unknown;
188
+ } | null;
174
189
  /**
175
190
  * ISO 8601 creation timestamp
176
191
  */
177
- dateCreated: string;
192
+ createdAt: string;
178
193
  /**
179
194
  * ISO 8601 last update timestamp
180
195
  */
181
- dateUpdated: string;
196
+ updatedAt: string;
182
197
  };
183
198
 
184
199
  export type ProjectWithScreenshot = {
@@ -191,9 +206,9 @@ export type ProjectWithScreenshot = {
191
206
  */
192
207
  name: string;
193
208
  /**
194
- * User ID who owns the project
209
+ * User's Dazl ID
195
210
  */
196
- userId: number;
211
+ dazlUserId: string;
197
212
  /**
198
213
  * ISO 8601 creation timestamp
199
214
  */
@@ -233,8 +248,6 @@ export type ProjectWithScreenshot = {
233
248
  */
234
249
  createdAt: string;
235
250
  id: string;
236
- projectId?: string;
237
- userId?: number;
238
251
  } | null;
239
252
  };
240
253
 
@@ -251,6 +264,14 @@ export type Screenshot = {
251
264
  * URL where the screenshot is accessible
252
265
  */
253
266
  url: string;
267
+ /**
268
+ * Project identifier
269
+ */
270
+ projectId: string;
271
+ /**
272
+ * User's Dazl ID
273
+ */
274
+ dazlUserId: string;
254
275
  /**
255
276
  * Git commit hash when screenshot was taken
256
277
  */
@@ -2268,6 +2289,323 @@ export type GetUserProjectsResponses = {
2268
2289
 
2269
2290
  export type GetUserProjectsResponse = GetUserProjectsResponses[keyof GetUserProjectsResponses];
2270
2291
 
2292
+ export type InviteProjectMemberData = {
2293
+ body: {
2294
+ role: 'admin' | 'contributor' | 'viewer';
2295
+ email: string;
2296
+ invitedByDazlId: string;
2297
+ };
2298
+ path: {
2299
+ projectId: string;
2300
+ };
2301
+ query?: never;
2302
+ url: '/project/{projectId}/members/invite';
2303
+ };
2304
+
2305
+ export type InviteProjectMemberErrors = {
2306
+ /**
2307
+ * Bad request - Invalid parameters or malformed JSON
2308
+ */
2309
+ 400: {
2310
+ message: string;
2311
+ issues?: string;
2312
+ };
2313
+ /**
2314
+ * Unauthorized
2315
+ */
2316
+ 401: ErrorResponse;
2317
+ /**
2318
+ * Forbidden
2319
+ */
2320
+ 403: ErrorResponse;
2321
+ /**
2322
+ * Not Found
2323
+ */
2324
+ 404: ErrorResponse;
2325
+ /**
2326
+ * Conflict
2327
+ */
2328
+ 409: ErrorResponse;
2329
+ /**
2330
+ * Internal server error
2331
+ */
2332
+ 500: ErrorResponse;
2333
+ /**
2334
+ * Service Unavailable
2335
+ */
2336
+ 503: ErrorResponse;
2337
+ };
2338
+
2339
+ export type InviteProjectMemberError = InviteProjectMemberErrors[keyof InviteProjectMemberErrors];
2340
+
2341
+ export type InviteProjectMemberResponses = {
2342
+ /**
2343
+ * Returns the invitation token, or null if user was auto-added to project
2344
+ */
2345
+ 200: {
2346
+ token: string | null;
2347
+ };
2348
+ };
2349
+
2350
+ export type InviteProjectMemberResponse = InviteProjectMemberResponses[keyof InviteProjectMemberResponses];
2351
+
2352
+ export type AcceptProjectInvitationData = {
2353
+ body: {
2354
+ token: string;
2355
+ userDazlId: string;
2356
+ };
2357
+ path?: never;
2358
+ query?: never;
2359
+ url: '/project/members/accept-invitation';
2360
+ };
2361
+
2362
+ export type AcceptProjectInvitationErrors = {
2363
+ /**
2364
+ * Bad request - Invalid parameters or malformed JSON
2365
+ */
2366
+ 400: {
2367
+ message: string;
2368
+ issues?: string;
2369
+ };
2370
+ /**
2371
+ * Unauthorized
2372
+ */
2373
+ 401: ErrorResponse;
2374
+ /**
2375
+ * Forbidden
2376
+ */
2377
+ 403: ErrorResponse;
2378
+ /**
2379
+ * Not Found
2380
+ */
2381
+ 404: ErrorResponse;
2382
+ /**
2383
+ * Conflict
2384
+ */
2385
+ 409: ErrorResponse;
2386
+ /**
2387
+ * Internal server error
2388
+ */
2389
+ 500: ErrorResponse;
2390
+ /**
2391
+ * Service Unavailable
2392
+ */
2393
+ 503: ErrorResponse;
2394
+ };
2395
+
2396
+ export type AcceptProjectInvitationError = AcceptProjectInvitationErrors[keyof AcceptProjectInvitationErrors];
2397
+
2398
+ export type AcceptProjectInvitationResponses = {
2399
+ /**
2400
+ * Acknowledges that the invitation was accepted
2401
+ */
2402
+ 200: {
2403
+ status: 'accepted';
2404
+ };
2405
+ };
2406
+
2407
+ export type AcceptProjectInvitationResponse = AcceptProjectInvitationResponses[keyof AcceptProjectInvitationResponses];
2408
+
2409
+ export type GetProjectCollaboratorsData = {
2410
+ body?: never;
2411
+ path: {
2412
+ projectId: string;
2413
+ };
2414
+ query: {
2415
+ userDazlId: string;
2416
+ };
2417
+ url: '/project/{projectId}/collaborators';
2418
+ };
2419
+
2420
+ export type GetProjectCollaboratorsErrors = {
2421
+ /**
2422
+ * Bad request - Invalid parameters or malformed JSON
2423
+ */
2424
+ 400: {
2425
+ message: string;
2426
+ issues?: string;
2427
+ };
2428
+ /**
2429
+ * Unauthorized
2430
+ */
2431
+ 401: ErrorResponse;
2432
+ /**
2433
+ * Forbidden
2434
+ */
2435
+ 403: ErrorResponse;
2436
+ /**
2437
+ * Not Found
2438
+ */
2439
+ 404: ErrorResponse;
2440
+ /**
2441
+ * Conflict
2442
+ */
2443
+ 409: ErrorResponse;
2444
+ /**
2445
+ * Internal server error
2446
+ */
2447
+ 500: ErrorResponse;
2448
+ /**
2449
+ * Service Unavailable
2450
+ */
2451
+ 503: ErrorResponse;
2452
+ };
2453
+
2454
+ export type GetProjectCollaboratorsError = GetProjectCollaboratorsErrors[keyof GetProjectCollaboratorsErrors];
2455
+
2456
+ export type GetProjectCollaboratorsResponses = {
2457
+ /**
2458
+ * Returns the list of project collaborators: both members and invitations
2459
+ */
2460
+ 200: {
2461
+ owner: {
2462
+ /**
2463
+ * Dazl ID for the type = "user"
2464
+ */
2465
+ id: string;
2466
+ role: 'admin' | 'contributor' | 'viewer' | 'owner';
2467
+ email: string;
2468
+ name?: string;
2469
+ picture?: string;
2470
+ };
2471
+ members: Array<{
2472
+ /**
2473
+ * Dazl ID for the type = "user"
2474
+ */
2475
+ id: string;
2476
+ role: 'admin' | 'contributor' | 'viewer' | 'owner';
2477
+ email: string;
2478
+ name?: string;
2479
+ picture?: string;
2480
+ }>;
2481
+ invited: Array<{
2482
+ role: 'admin' | 'contributor' | 'viewer';
2483
+ email?: string;
2484
+ id: string;
2485
+ }>;
2486
+ };
2487
+ };
2488
+
2489
+ export type GetProjectCollaboratorsResponse = GetProjectCollaboratorsResponses[keyof GetProjectCollaboratorsResponses];
2490
+
2491
+ export type DeleteProjectMemberData = {
2492
+ body?: never;
2493
+ path: {
2494
+ projectId: string;
2495
+ memberId: string;
2496
+ };
2497
+ query: {
2498
+ userDazlId: string;
2499
+ };
2500
+ url: '/project/{projectId}/members/{memberId}';
2501
+ };
2502
+
2503
+ export type DeleteProjectMemberErrors = {
2504
+ /**
2505
+ * Bad request - Invalid parameters or malformed JSON
2506
+ */
2507
+ 400: {
2508
+ message: string;
2509
+ issues?: string;
2510
+ };
2511
+ /**
2512
+ * Unauthorized
2513
+ */
2514
+ 401: ErrorResponse;
2515
+ /**
2516
+ * Forbidden
2517
+ */
2518
+ 403: ErrorResponse;
2519
+ /**
2520
+ * Not Found
2521
+ */
2522
+ 404: ErrorResponse;
2523
+ /**
2524
+ * Conflict
2525
+ */
2526
+ 409: ErrorResponse;
2527
+ /**
2528
+ * Internal server error
2529
+ */
2530
+ 500: ErrorResponse;
2531
+ /**
2532
+ * Service Unavailable
2533
+ */
2534
+ 503: ErrorResponse;
2535
+ };
2536
+
2537
+ export type DeleteProjectMemberError = DeleteProjectMemberErrors[keyof DeleteProjectMemberErrors];
2538
+
2539
+ export type DeleteProjectMemberResponses = {
2540
+ /**
2541
+ * Acknowledges that the project member was deleted
2542
+ */
2543
+ 200: {
2544
+ status: 'deleted';
2545
+ };
2546
+ };
2547
+
2548
+ export type DeleteProjectMemberResponse = DeleteProjectMemberResponses[keyof DeleteProjectMemberResponses];
2549
+
2550
+ export type DeleteProjectInvitationData = {
2551
+ body?: never;
2552
+ path: {
2553
+ projectId: string;
2554
+ invitationId: string;
2555
+ };
2556
+ query: {
2557
+ userDazlId: string;
2558
+ };
2559
+ url: '/project/{projectId}/invitations/{invitationId}';
2560
+ };
2561
+
2562
+ export type DeleteProjectInvitationErrors = {
2563
+ /**
2564
+ * Bad request - Invalid parameters or malformed JSON
2565
+ */
2566
+ 400: {
2567
+ message: string;
2568
+ issues?: string;
2569
+ };
2570
+ /**
2571
+ * Unauthorized
2572
+ */
2573
+ 401: ErrorResponse;
2574
+ /**
2575
+ * Forbidden
2576
+ */
2577
+ 403: ErrorResponse;
2578
+ /**
2579
+ * Not Found
2580
+ */
2581
+ 404: ErrorResponse;
2582
+ /**
2583
+ * Conflict
2584
+ */
2585
+ 409: ErrorResponse;
2586
+ /**
2587
+ * Internal server error
2588
+ */
2589
+ 500: ErrorResponse;
2590
+ /**
2591
+ * Service Unavailable
2592
+ */
2593
+ 503: ErrorResponse;
2594
+ };
2595
+
2596
+ export type DeleteProjectInvitationError = DeleteProjectInvitationErrors[keyof DeleteProjectInvitationErrors];
2597
+
2598
+ export type DeleteProjectInvitationResponses = {
2599
+ /**
2600
+ * Acknowledges that the project invitation was deleted
2601
+ */
2602
+ 200: {
2603
+ status: 'deleted';
2604
+ };
2605
+ };
2606
+
2607
+ export type DeleteProjectInvitationResponse = DeleteProjectInvitationResponses[keyof DeleteProjectInvitationResponses];
2608
+
2271
2609
  export type GetPublicTemplatesData = {
2272
2610
  body?: never;
2273
2611
  path?: never;
@@ -2723,29 +3061,17 @@ export type ListFilesData = {
2723
3061
  */
2724
3062
  projectId: string;
2725
3063
  /**
2726
- * Path within the project to list files from
3064
+ * Filter by MIME type prefix (e.g., 'image/' for all images)
2727
3065
  */
2728
- path?: string;
2729
- /**
2730
- * Filter by type: '-' for files, 'd' for directories
2731
- */
2732
- type?: '-' | 'd';
2733
- /**
2734
- * Field to order results by
2735
- */
2736
- orderBy?: 'dateUpdated' | 'name';
3066
+ mimeType?: string;
2737
3067
  /**
2738
- * Sort direction
3068
+ * Cursor token for fetching the next page of results
2739
3069
  */
2740
- orderDirection?: 'asc' | 'desc';
3070
+ cursor?: string;
2741
3071
  /**
2742
3072
  * Number of items per page
2743
3073
  */
2744
3074
  pageSize?: number;
2745
- /**
2746
- * Token for fetching the next page of results
2747
- */
2748
- nextPageToken?: string;
2749
3075
  };
2750
3076
  url: '/media/list';
2751
3077
  };