@dazl/internal-api-client 1.16.0 → 1.17.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.
@@ -99,6 +99,9 @@ export type ProjectRaw = {
99
99
  }>;
100
100
  };
101
101
  export type OwnerDazlId = {
102
+ /**
103
+ * The dazl ID of the requesting user, used for permission checks
104
+ */
102
105
  ownerDazlId: string;
103
106
  };
104
107
  export type UserMention = {
@@ -129,6 +132,7 @@ export type InternalCreateCommentInput = {
129
132
  export type InternalEditCommentInput = {
130
133
  content: string;
131
134
  mentions?: Array<UserMention>;
135
+ editorDazlUserId?: string;
132
136
  };
133
137
  export type InternalCreateReplyInput = {
134
138
  content: string;
@@ -138,12 +142,13 @@ export type InternalCreateReplyInput = {
138
142
  export type InternalEditReplyInput = {
139
143
  content: string;
140
144
  mentions?: Array<UserMention>;
145
+ editorDazlUserId?: string;
141
146
  };
142
147
  export type TemplateRaw = {
143
148
  id: string;
144
149
  name: string;
145
150
  userId: number;
146
- dazlUserId: string | null;
151
+ dazlUserId: string;
147
152
  originProjectId: string;
148
153
  screenshot: string | null;
149
154
  createdAt: string;
@@ -328,38 +333,53 @@ export type UserDisplayInfoResponse = {
328
333
  picture?: string | null;
329
334
  };
330
335
  export type DeleteProjectInput = {
336
+ /**
337
+ * The name of the project being deleted
338
+ */
339
+ projectName: string;
340
+ } & {
331
341
  /**
332
342
  * The admin user's internal ID
333
343
  */
334
344
  adminUserId: number;
335
345
  /**
336
- * The owner of the project being deleted
346
+ * The admin user's Dazl ID
347
+ */
348
+ adminDazlUserId?: string;
349
+ } & {
350
+ /**
351
+ * The target user's internal ID
337
352
  */
338
353
  targetUserId: number;
339
354
  /**
340
- * The name of the project being deleted
355
+ * The target user's Dazl ID
341
356
  */
342
- projectName: string;
357
+ targetDazlUserId?: string;
343
358
  };
344
359
  export type CloneProjectCreateInput = {
345
360
  /**
346
361
  * The name of the original project
347
362
  */
348
363
  originalProjectName: string;
364
+ } & {
349
365
  /**
350
366
  * The admin user's internal ID
351
367
  */
352
368
  adminUserId: number;
353
- };
354
- export type CloneProjectLogInput = {
355
369
  /**
356
- * The admin user's internal ID
370
+ * The admin user's Dazl ID
357
371
  */
358
- adminUserId: number;
372
+ adminDazlUserId?: string;
373
+ };
374
+ export type CloneProjectLogInput = {
359
375
  /**
360
376
  * The internal ID of the original project owner
361
377
  */
362
378
  originalProjectOwnerId: number;
379
+ /**
380
+ * The Dazl ID of the original project owner
381
+ */
382
+ originalProjectOwnerDazlId?: string;
363
383
  /**
364
384
  * The ID of the original project
365
385
  */
@@ -368,6 +388,15 @@ export type CloneProjectLogInput = {
368
388
  * The name of the original project
369
389
  */
370
390
  originalProjectName: string;
391
+ } & {
392
+ /**
393
+ * The admin user's internal ID
394
+ */
395
+ adminUserId: number;
396
+ /**
397
+ * The admin user's Dazl ID
398
+ */
399
+ adminDazlUserId?: string;
371
400
  };
372
401
  export type CleanupProjectInput = {
373
402
  /**
@@ -376,10 +405,6 @@ export type CleanupProjectInput = {
376
405
  newProjectId: string;
377
406
  };
378
407
  export type UpdateCreditsInput = {
379
- /**
380
- * The user whose credits are being updated
381
- */
382
- targetUserId: number;
383
408
  /**
384
409
  * The new credit balance
385
410
  */
@@ -388,14 +413,28 @@ export type UpdateCreditsInput = {
388
413
  * The previous credit balance
389
414
  */
390
415
  oldBalance: number;
416
+ /**
417
+ * Optional reason for the credit change
418
+ */
419
+ reason?: string | null;
420
+ } & {
391
421
  /**
392
422
  * The admin user's internal ID
393
423
  */
394
424
  adminUserId: number;
395
425
  /**
396
- * Optional reason for the credit change
426
+ * The admin user's Dazl ID
397
427
  */
398
- reason?: string | null;
428
+ adminDazlUserId?: string;
429
+ } & {
430
+ /**
431
+ * The target user's internal ID
432
+ */
433
+ targetUserId: number;
434
+ /**
435
+ * The target user's Dazl ID
436
+ */
437
+ targetDazlUserId?: string;
399
438
  };
400
439
  export type FeatureToggle = {
401
440
  name: string;
@@ -1883,6 +1922,9 @@ export type GetEntriConfigResponses = {
1883
1922
  export type GetEntriConfigResponse = GetEntriConfigResponses[keyof GetEntriConfigResponses];
1884
1923
  export type DuplicateProjectData = {
1885
1924
  body: {
1925
+ /**
1926
+ * The dazl ID of the requesting user, used for permission checks
1927
+ */
1886
1928
  ownerDazlId: string;
1887
1929
  /**
1888
1930
  * Optional new name for the duplicated project
@@ -1995,6 +2037,9 @@ export type GetProjectByIdData = {
1995
2037
  projectId: string;
1996
2038
  };
1997
2039
  query: {
2040
+ /**
2041
+ * The dazl ID of the requesting user, used for permission checks
2042
+ */
1998
2043
  ownerDazlId: string;
1999
2044
  };
2000
2045
  url: '/project/{projectId}';
@@ -2048,6 +2093,9 @@ export type UpdateProjectData = {
2048
2093
  lastOpenedAt?: string | string | null;
2049
2094
  latestScreenshot?: string | null;
2050
2095
  archivedAt?: string | string | null;
2096
+ /**
2097
+ * The dazl ID of the requesting user, used for permission checks
2098
+ */
2051
2099
  ownerDazlId: string;
2052
2100
  };
2053
2101
  path: {
@@ -2156,6 +2204,9 @@ export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectRe
2156
2204
  export type GetUserProjectsData = {
2157
2205
  body?: never;
2158
2206
  path: {
2207
+ /**
2208
+ * The dazl ID of the requesting user, used for permission checks
2209
+ */
2159
2210
  ownerDazlId: string;
2160
2211
  };
2161
2212
  query?: {
@@ -2516,15 +2567,70 @@ export type DeleteProjectInvitationResponses = {
2516
2567
  };
2517
2568
  };
2518
2569
  export type DeleteProjectInvitationResponse = DeleteProjectInvitationResponses[keyof DeleteProjectInvitationResponses];
2519
- export type InternalListProjectCommentsData = {
2570
+ export type InternalDeleteCommentData = {
2571
+ body?: never;
2572
+ path: {
2573
+ projectId: string;
2574
+ commentId: string;
2575
+ };
2576
+ query?: {
2577
+ editorDazlUserId?: string;
2578
+ };
2579
+ url: '/project/{projectId}/comments/{commentId}';
2580
+ };
2581
+ export type InternalDeleteCommentErrors = {
2582
+ /**
2583
+ * Bad request - Invalid parameters or malformed JSON
2584
+ */
2585
+ 400: {
2586
+ message: string;
2587
+ issues?: string;
2588
+ };
2589
+ /**
2590
+ * Unauthorized
2591
+ */
2592
+ 401: ErrorResponse;
2593
+ /**
2594
+ * Forbidden
2595
+ */
2596
+ 403: ErrorResponse;
2597
+ /**
2598
+ * Not Found
2599
+ */
2600
+ 404: ErrorResponse;
2601
+ /**
2602
+ * Conflict
2603
+ */
2604
+ 409: ErrorResponse;
2605
+ /**
2606
+ * Internal server error
2607
+ */
2608
+ 500: ErrorResponse;
2609
+ /**
2610
+ * Service Unavailable
2611
+ */
2612
+ 503: ErrorResponse;
2613
+ };
2614
+ export type InternalDeleteCommentError = InternalDeleteCommentErrors[keyof InternalDeleteCommentErrors];
2615
+ export type InternalDeleteCommentResponses = {
2616
+ /**
2617
+ * Acknowledges that the comment was deleted
2618
+ */
2619
+ 200: {
2620
+ success: true;
2621
+ };
2622
+ };
2623
+ export type InternalDeleteCommentResponse = InternalDeleteCommentResponses[keyof InternalDeleteCommentResponses];
2624
+ export type InternalGetProjectCommentData = {
2520
2625
  body?: never;
2521
2626
  path: {
2522
2627
  projectId: string;
2628
+ commentId: string;
2523
2629
  };
2524
2630
  query?: never;
2525
- url: '/project/{projectId}/comments';
2631
+ url: '/project/{projectId}/comments/{commentId}';
2526
2632
  };
2527
- export type InternalListProjectCommentsErrors = {
2633
+ export type InternalGetProjectCommentErrors = {
2528
2634
  /**
2529
2635
  * Bad request - Invalid parameters or malformed JSON
2530
2636
  */
@@ -2557,13 +2663,13 @@ export type InternalListProjectCommentsErrors = {
2557
2663
  */
2558
2664
  503: ErrorResponse;
2559
2665
  };
2560
- export type InternalListProjectCommentsError = InternalListProjectCommentsErrors[keyof InternalListProjectCommentsErrors];
2561
- export type InternalListProjectCommentsResponses = {
2666
+ export type InternalGetProjectCommentError = InternalGetProjectCommentErrors[keyof InternalGetProjectCommentErrors];
2667
+ export type InternalGetProjectCommentResponses = {
2562
2668
  /**
2563
- * Returns the list of comments for the project
2669
+ * Returns comment by id for the project
2564
2670
  */
2565
2671
  200: {
2566
- comments: Array<{
2672
+ comment: {
2567
2673
  commentId: string;
2568
2674
  author: {
2569
2675
  dazlUserId: string;
@@ -2586,19 +2692,20 @@ export type InternalListProjectCommentsResponses = {
2586
2692
  }>;
2587
2693
  resolved?: CommentResolved;
2588
2694
  context?: CommentContext;
2589
- }>;
2695
+ };
2590
2696
  };
2591
2697
  };
2592
- export type InternalListProjectCommentsResponse = InternalListProjectCommentsResponses[keyof InternalListProjectCommentsResponses];
2593
- export type InternalCreateCommentData = {
2594
- body: InternalCreateCommentInput;
2698
+ export type InternalGetProjectCommentResponse = InternalGetProjectCommentResponses[keyof InternalGetProjectCommentResponses];
2699
+ export type InternalEditCommentData = {
2700
+ body: InternalEditCommentInput;
2595
2701
  path: {
2596
2702
  projectId: string;
2703
+ commentId: string;
2597
2704
  };
2598
2705
  query?: never;
2599
- url: '/project/{projectId}/comments';
2706
+ url: '/project/{projectId}/comments/{commentId}';
2600
2707
  };
2601
- export type InternalCreateCommentErrors = {
2708
+ export type InternalEditCommentErrors = {
2602
2709
  /**
2603
2710
  * Bad request - Invalid parameters or malformed JSON
2604
2711
  */
@@ -2631,10 +2738,10 @@ export type InternalCreateCommentErrors = {
2631
2738
  */
2632
2739
  503: ErrorResponse;
2633
2740
  };
2634
- export type InternalCreateCommentError = InternalCreateCommentErrors[keyof InternalCreateCommentErrors];
2635
- export type InternalCreateCommentResponses = {
2741
+ export type InternalEditCommentError = InternalEditCommentErrors[keyof InternalEditCommentErrors];
2742
+ export type InternalEditCommentResponses = {
2636
2743
  /**
2637
- * Returns the created comment
2744
+ * Returns the updated comment
2638
2745
  */
2639
2746
  200: {
2640
2747
  comment: {
@@ -2663,17 +2770,16 @@ export type InternalCreateCommentResponses = {
2663
2770
  };
2664
2771
  };
2665
2772
  };
2666
- export type InternalCreateCommentResponse = InternalCreateCommentResponses[keyof InternalCreateCommentResponses];
2667
- export type InternalDeleteCommentData = {
2773
+ export type InternalEditCommentResponse = InternalEditCommentResponses[keyof InternalEditCommentResponses];
2774
+ export type InternalListProjectCommentsData = {
2668
2775
  body?: never;
2669
2776
  path: {
2670
2777
  projectId: string;
2671
- commentId: string;
2672
2778
  };
2673
2779
  query?: never;
2674
- url: '/project/{projectId}/comments/{commentId}';
2780
+ url: '/project/{projectId}/comments';
2675
2781
  };
2676
- export type InternalDeleteCommentErrors = {
2782
+ export type InternalListProjectCommentsErrors = {
2677
2783
  /**
2678
2784
  * Bad request - Invalid parameters or malformed JSON
2679
2785
  */
@@ -2706,26 +2812,48 @@ export type InternalDeleteCommentErrors = {
2706
2812
  */
2707
2813
  503: ErrorResponse;
2708
2814
  };
2709
- export type InternalDeleteCommentError = InternalDeleteCommentErrors[keyof InternalDeleteCommentErrors];
2710
- export type InternalDeleteCommentResponses = {
2815
+ export type InternalListProjectCommentsError = InternalListProjectCommentsErrors[keyof InternalListProjectCommentsErrors];
2816
+ export type InternalListProjectCommentsResponses = {
2711
2817
  /**
2712
- * Acknowledges that the comment was deleted
2818
+ * Returns the list of comments for the project
2713
2819
  */
2714
2820
  200: {
2715
- success: true;
2821
+ comments: Array<{
2822
+ commentId: string;
2823
+ author: {
2824
+ dazlUserId: string;
2825
+ };
2826
+ content: string;
2827
+ mentions: Array<UserMention>;
2828
+ createdAt: string;
2829
+ updatedAt: string;
2830
+ lastActivityAt: string;
2831
+ isEdited: boolean;
2832
+ replies: Array<{
2833
+ replyId: string;
2834
+ author: {
2835
+ dazlUserId: string;
2836
+ };
2837
+ content: string;
2838
+ mentions: Array<UserMention>;
2839
+ createdAt: string;
2840
+ updatedAt: string;
2841
+ }>;
2842
+ resolved?: CommentResolved;
2843
+ context?: CommentContext;
2844
+ }>;
2716
2845
  };
2717
2846
  };
2718
- export type InternalDeleteCommentResponse = InternalDeleteCommentResponses[keyof InternalDeleteCommentResponses];
2719
- export type InternalEditCommentData = {
2720
- body: InternalEditCommentInput;
2847
+ export type InternalListProjectCommentsResponse = InternalListProjectCommentsResponses[keyof InternalListProjectCommentsResponses];
2848
+ export type InternalCreateCommentData = {
2849
+ body: InternalCreateCommentInput;
2721
2850
  path: {
2722
2851
  projectId: string;
2723
- commentId: string;
2724
2852
  };
2725
2853
  query?: never;
2726
- url: '/project/{projectId}/comments/{commentId}';
2854
+ url: '/project/{projectId}/comments';
2727
2855
  };
2728
- export type InternalEditCommentErrors = {
2856
+ export type InternalCreateCommentErrors = {
2729
2857
  /**
2730
2858
  * Bad request - Invalid parameters or malformed JSON
2731
2859
  */
@@ -2758,10 +2886,10 @@ export type InternalEditCommentErrors = {
2758
2886
  */
2759
2887
  503: ErrorResponse;
2760
2888
  };
2761
- export type InternalEditCommentError = InternalEditCommentErrors[keyof InternalEditCommentErrors];
2762
- export type InternalEditCommentResponses = {
2889
+ export type InternalCreateCommentError = InternalCreateCommentErrors[keyof InternalCreateCommentErrors];
2890
+ export type InternalCreateCommentResponses = {
2763
2891
  /**
2764
- * Returns the updated comment
2892
+ * Returns the created comment
2765
2893
  */
2766
2894
  200: {
2767
2895
  comment: {
@@ -2790,7 +2918,7 @@ export type InternalEditCommentResponses = {
2790
2918
  };
2791
2919
  };
2792
2920
  };
2793
- export type InternalEditCommentResponse = InternalEditCommentResponses[keyof InternalEditCommentResponses];
2921
+ export type InternalCreateCommentResponse = InternalCreateCommentResponses[keyof InternalCreateCommentResponses];
2794
2922
  export type InternalResolveCommentData = {
2795
2923
  body?: never;
2796
2924
  path: {
@@ -3011,7 +3139,9 @@ export type InternalDeleteReplyData = {
3011
3139
  commentId: string;
3012
3140
  replyId: string;
3013
3141
  };
3014
- query?: never;
3142
+ query?: {
3143
+ editorDazlUserId?: string;
3144
+ };
3015
3145
  url: '/project/{projectId}/comments/{commentId}/replies/{replyId}';
3016
3146
  };
3017
3147
  export type InternalDeleteReplyErrors = {