@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.
package/src/types.gen.ts CHANGED
@@ -110,6 +110,9 @@ export type ProjectRaw = {
110
110
  };
111
111
 
112
112
  export type OwnerDazlId = {
113
+ /**
114
+ * The dazl ID of the requesting user, used for permission checks
115
+ */
113
116
  ownerDazlId: string;
114
117
  };
115
118
 
@@ -147,6 +150,7 @@ export type InternalCreateCommentInput = {
147
150
  export type InternalEditCommentInput = {
148
151
  content: string;
149
152
  mentions?: Array<UserMention>;
153
+ editorDazlUserId?: string;
150
154
  };
151
155
 
152
156
  export type InternalCreateReplyInput = {
@@ -158,13 +162,14 @@ export type InternalCreateReplyInput = {
158
162
  export type InternalEditReplyInput = {
159
163
  content: string;
160
164
  mentions?: Array<UserMention>;
165
+ editorDazlUserId?: string;
161
166
  };
162
167
 
163
168
  export type TemplateRaw = {
164
169
  id: string;
165
170
  name: string;
166
171
  userId: number;
167
- dazlUserId: string | null;
172
+ dazlUserId: string;
168
173
  originProjectId: string;
169
174
  screenshot: string | null;
170
175
  createdAt: string;
@@ -357,18 +362,28 @@ export type UserDisplayInfoResponse = {
357
362
  };
358
363
 
359
364
  export type DeleteProjectInput = {
365
+ /**
366
+ * The name of the project being deleted
367
+ */
368
+ projectName: string;
369
+ } & {
360
370
  /**
361
371
  * The admin user's internal ID
362
372
  */
363
373
  adminUserId: number;
364
374
  /**
365
- * The owner of the project being deleted
375
+ * The admin user's Dazl ID
376
+ */
377
+ adminDazlUserId?: string;
378
+ } & {
379
+ /**
380
+ * The target user's internal ID
366
381
  */
367
382
  targetUserId: number;
368
383
  /**
369
- * The name of the project being deleted
384
+ * The target user's Dazl ID
370
385
  */
371
- projectName: string;
386
+ targetDazlUserId?: string;
372
387
  };
373
388
 
374
389
  export type CloneProjectCreateInput = {
@@ -376,21 +391,26 @@ export type CloneProjectCreateInput = {
376
391
  * The name of the original project
377
392
  */
378
393
  originalProjectName: string;
394
+ } & {
379
395
  /**
380
396
  * The admin user's internal ID
381
397
  */
382
398
  adminUserId: number;
399
+ /**
400
+ * The admin user's Dazl ID
401
+ */
402
+ adminDazlUserId?: string;
383
403
  };
384
404
 
385
405
  export type CloneProjectLogInput = {
386
- /**
387
- * The admin user's internal ID
388
- */
389
- adminUserId: number;
390
406
  /**
391
407
  * The internal ID of the original project owner
392
408
  */
393
409
  originalProjectOwnerId: number;
410
+ /**
411
+ * The Dazl ID of the original project owner
412
+ */
413
+ originalProjectOwnerDazlId?: string;
394
414
  /**
395
415
  * The ID of the original project
396
416
  */
@@ -399,6 +419,15 @@ export type CloneProjectLogInput = {
399
419
  * The name of the original project
400
420
  */
401
421
  originalProjectName: string;
422
+ } & {
423
+ /**
424
+ * The admin user's internal ID
425
+ */
426
+ adminUserId: number;
427
+ /**
428
+ * The admin user's Dazl ID
429
+ */
430
+ adminDazlUserId?: string;
402
431
  };
403
432
 
404
433
  export type CleanupProjectInput = {
@@ -409,10 +438,6 @@ export type CleanupProjectInput = {
409
438
  };
410
439
 
411
440
  export type UpdateCreditsInput = {
412
- /**
413
- * The user whose credits are being updated
414
- */
415
- targetUserId: number;
416
441
  /**
417
442
  * The new credit balance
418
443
  */
@@ -421,14 +446,28 @@ export type UpdateCreditsInput = {
421
446
  * The previous credit balance
422
447
  */
423
448
  oldBalance: number;
449
+ /**
450
+ * Optional reason for the credit change
451
+ */
452
+ reason?: string | null;
453
+ } & {
424
454
  /**
425
455
  * The admin user's internal ID
426
456
  */
427
457
  adminUserId: number;
428
458
  /**
429
- * Optional reason for the credit change
459
+ * The admin user's Dazl ID
430
460
  */
431
- reason?: string | null;
461
+ adminDazlUserId?: string;
462
+ } & {
463
+ /**
464
+ * The target user's internal ID
465
+ */
466
+ targetUserId: number;
467
+ /**
468
+ * The target user's Dazl ID
469
+ */
470
+ targetDazlUserId?: string;
432
471
  };
433
472
 
434
473
  export type FeatureToggle = {
@@ -2054,6 +2093,9 @@ export type GetEntriConfigResponse = GetEntriConfigResponses[keyof GetEntriConfi
2054
2093
 
2055
2094
  export type DuplicateProjectData = {
2056
2095
  body: {
2096
+ /**
2097
+ * The dazl ID of the requesting user, used for permission checks
2098
+ */
2057
2099
  ownerDazlId: string;
2058
2100
  /**
2059
2101
  * Optional new name for the duplicated project
@@ -2176,6 +2218,9 @@ export type GetProjectByIdData = {
2176
2218
  projectId: string;
2177
2219
  };
2178
2220
  query: {
2221
+ /**
2222
+ * The dazl ID of the requesting user, used for permission checks
2223
+ */
2179
2224
  ownerDazlId: string;
2180
2225
  };
2181
2226
  url: '/project/{projectId}';
@@ -2234,6 +2279,9 @@ export type UpdateProjectData = {
2234
2279
  lastOpenedAt?: string | string | null;
2235
2280
  latestScreenshot?: string | null;
2236
2281
  archivedAt?: string | string | null;
2282
+ /**
2283
+ * The dazl ID of the requesting user, used for permission checks
2284
+ */
2237
2285
  ownerDazlId: string;
2238
2286
  };
2239
2287
  path: {
@@ -2352,6 +2400,9 @@ export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectRe
2352
2400
  export type GetUserProjectsData = {
2353
2401
  body?: never;
2354
2402
  path: {
2403
+ /**
2404
+ * The dazl ID of the requesting user, used for permission checks
2405
+ */
2355
2406
  ownerDazlId: string;
2356
2407
  };
2357
2408
  query?: {
@@ -2742,16 +2793,76 @@ export type DeleteProjectInvitationResponses = {
2742
2793
 
2743
2794
  export type DeleteProjectInvitationResponse = DeleteProjectInvitationResponses[keyof DeleteProjectInvitationResponses];
2744
2795
 
2745
- export type InternalListProjectCommentsData = {
2796
+ export type InternalDeleteCommentData = {
2746
2797
  body?: never;
2747
2798
  path: {
2748
2799
  projectId: string;
2800
+ commentId: string;
2801
+ };
2802
+ query?: {
2803
+ editorDazlUserId?: string;
2804
+ };
2805
+ url: '/project/{projectId}/comments/{commentId}';
2806
+ };
2807
+
2808
+ export type InternalDeleteCommentErrors = {
2809
+ /**
2810
+ * Bad request - Invalid parameters or malformed JSON
2811
+ */
2812
+ 400: {
2813
+ message: string;
2814
+ issues?: string;
2815
+ };
2816
+ /**
2817
+ * Unauthorized
2818
+ */
2819
+ 401: ErrorResponse;
2820
+ /**
2821
+ * Forbidden
2822
+ */
2823
+ 403: ErrorResponse;
2824
+ /**
2825
+ * Not Found
2826
+ */
2827
+ 404: ErrorResponse;
2828
+ /**
2829
+ * Conflict
2830
+ */
2831
+ 409: ErrorResponse;
2832
+ /**
2833
+ * Internal server error
2834
+ */
2835
+ 500: ErrorResponse;
2836
+ /**
2837
+ * Service Unavailable
2838
+ */
2839
+ 503: ErrorResponse;
2840
+ };
2841
+
2842
+ export type InternalDeleteCommentError = InternalDeleteCommentErrors[keyof InternalDeleteCommentErrors];
2843
+
2844
+ export type InternalDeleteCommentResponses = {
2845
+ /**
2846
+ * Acknowledges that the comment was deleted
2847
+ */
2848
+ 200: {
2849
+ success: true;
2850
+ };
2851
+ };
2852
+
2853
+ export type InternalDeleteCommentResponse = InternalDeleteCommentResponses[keyof InternalDeleteCommentResponses];
2854
+
2855
+ export type InternalGetProjectCommentData = {
2856
+ body?: never;
2857
+ path: {
2858
+ projectId: string;
2859
+ commentId: string;
2749
2860
  };
2750
2861
  query?: never;
2751
- url: '/project/{projectId}/comments';
2862
+ url: '/project/{projectId}/comments/{commentId}';
2752
2863
  };
2753
2864
 
2754
- export type InternalListProjectCommentsErrors = {
2865
+ export type InternalGetProjectCommentErrors = {
2755
2866
  /**
2756
2867
  * Bad request - Invalid parameters or malformed JSON
2757
2868
  */
@@ -2785,14 +2896,14 @@ export type InternalListProjectCommentsErrors = {
2785
2896
  503: ErrorResponse;
2786
2897
  };
2787
2898
 
2788
- export type InternalListProjectCommentsError = InternalListProjectCommentsErrors[keyof InternalListProjectCommentsErrors];
2899
+ export type InternalGetProjectCommentError = InternalGetProjectCommentErrors[keyof InternalGetProjectCommentErrors];
2789
2900
 
2790
- export type InternalListProjectCommentsResponses = {
2901
+ export type InternalGetProjectCommentResponses = {
2791
2902
  /**
2792
- * Returns the list of comments for the project
2903
+ * Returns comment by id for the project
2793
2904
  */
2794
2905
  200: {
2795
- comments: Array<{
2906
+ comment: {
2796
2907
  commentId: string;
2797
2908
  author: {
2798
2909
  dazlUserId: string;
@@ -2815,22 +2926,23 @@ export type InternalListProjectCommentsResponses = {
2815
2926
  }>;
2816
2927
  resolved?: CommentResolved;
2817
2928
  context?: CommentContext;
2818
- }>;
2929
+ };
2819
2930
  };
2820
2931
  };
2821
2932
 
2822
- export type InternalListProjectCommentsResponse = InternalListProjectCommentsResponses[keyof InternalListProjectCommentsResponses];
2933
+ export type InternalGetProjectCommentResponse = InternalGetProjectCommentResponses[keyof InternalGetProjectCommentResponses];
2823
2934
 
2824
- export type InternalCreateCommentData = {
2825
- body: InternalCreateCommentInput;
2935
+ export type InternalEditCommentData = {
2936
+ body: InternalEditCommentInput;
2826
2937
  path: {
2827
2938
  projectId: string;
2939
+ commentId: string;
2828
2940
  };
2829
2941
  query?: never;
2830
- url: '/project/{projectId}/comments';
2942
+ url: '/project/{projectId}/comments/{commentId}';
2831
2943
  };
2832
2944
 
2833
- export type InternalCreateCommentErrors = {
2945
+ export type InternalEditCommentErrors = {
2834
2946
  /**
2835
2947
  * Bad request - Invalid parameters or malformed JSON
2836
2948
  */
@@ -2864,11 +2976,11 @@ export type InternalCreateCommentErrors = {
2864
2976
  503: ErrorResponse;
2865
2977
  };
2866
2978
 
2867
- export type InternalCreateCommentError = InternalCreateCommentErrors[keyof InternalCreateCommentErrors];
2979
+ export type InternalEditCommentError = InternalEditCommentErrors[keyof InternalEditCommentErrors];
2868
2980
 
2869
- export type InternalCreateCommentResponses = {
2981
+ export type InternalEditCommentResponses = {
2870
2982
  /**
2871
- * Returns the created comment
2983
+ * Returns the updated comment
2872
2984
  */
2873
2985
  200: {
2874
2986
  comment: {
@@ -2898,19 +3010,18 @@ export type InternalCreateCommentResponses = {
2898
3010
  };
2899
3011
  };
2900
3012
 
2901
- export type InternalCreateCommentResponse = InternalCreateCommentResponses[keyof InternalCreateCommentResponses];
3013
+ export type InternalEditCommentResponse = InternalEditCommentResponses[keyof InternalEditCommentResponses];
2902
3014
 
2903
- export type InternalDeleteCommentData = {
3015
+ export type InternalListProjectCommentsData = {
2904
3016
  body?: never;
2905
3017
  path: {
2906
3018
  projectId: string;
2907
- commentId: string;
2908
3019
  };
2909
3020
  query?: never;
2910
- url: '/project/{projectId}/comments/{commentId}';
3021
+ url: '/project/{projectId}/comments';
2911
3022
  };
2912
3023
 
2913
- export type InternalDeleteCommentErrors = {
3024
+ export type InternalListProjectCommentsErrors = {
2914
3025
  /**
2915
3026
  * Bad request - Invalid parameters or malformed JSON
2916
3027
  */
@@ -2944,30 +3055,52 @@ export type InternalDeleteCommentErrors = {
2944
3055
  503: ErrorResponse;
2945
3056
  };
2946
3057
 
2947
- export type InternalDeleteCommentError = InternalDeleteCommentErrors[keyof InternalDeleteCommentErrors];
3058
+ export type InternalListProjectCommentsError = InternalListProjectCommentsErrors[keyof InternalListProjectCommentsErrors];
2948
3059
 
2949
- export type InternalDeleteCommentResponses = {
3060
+ export type InternalListProjectCommentsResponses = {
2950
3061
  /**
2951
- * Acknowledges that the comment was deleted
3062
+ * Returns the list of comments for the project
2952
3063
  */
2953
3064
  200: {
2954
- success: true;
3065
+ comments: Array<{
3066
+ commentId: string;
3067
+ author: {
3068
+ dazlUserId: string;
3069
+ };
3070
+ content: string;
3071
+ mentions: Array<UserMention>;
3072
+ createdAt: string;
3073
+ updatedAt: string;
3074
+ lastActivityAt: string;
3075
+ isEdited: boolean;
3076
+ replies: Array<{
3077
+ replyId: string;
3078
+ author: {
3079
+ dazlUserId: string;
3080
+ };
3081
+ content: string;
3082
+ mentions: Array<UserMention>;
3083
+ createdAt: string;
3084
+ updatedAt: string;
3085
+ }>;
3086
+ resolved?: CommentResolved;
3087
+ context?: CommentContext;
3088
+ }>;
2955
3089
  };
2956
3090
  };
2957
3091
 
2958
- export type InternalDeleteCommentResponse = InternalDeleteCommentResponses[keyof InternalDeleteCommentResponses];
3092
+ export type InternalListProjectCommentsResponse = InternalListProjectCommentsResponses[keyof InternalListProjectCommentsResponses];
2959
3093
 
2960
- export type InternalEditCommentData = {
2961
- body: InternalEditCommentInput;
3094
+ export type InternalCreateCommentData = {
3095
+ body: InternalCreateCommentInput;
2962
3096
  path: {
2963
3097
  projectId: string;
2964
- commentId: string;
2965
3098
  };
2966
3099
  query?: never;
2967
- url: '/project/{projectId}/comments/{commentId}';
3100
+ url: '/project/{projectId}/comments';
2968
3101
  };
2969
3102
 
2970
- export type InternalEditCommentErrors = {
3103
+ export type InternalCreateCommentErrors = {
2971
3104
  /**
2972
3105
  * Bad request - Invalid parameters or malformed JSON
2973
3106
  */
@@ -3001,11 +3134,11 @@ export type InternalEditCommentErrors = {
3001
3134
  503: ErrorResponse;
3002
3135
  };
3003
3136
 
3004
- export type InternalEditCommentError = InternalEditCommentErrors[keyof InternalEditCommentErrors];
3137
+ export type InternalCreateCommentError = InternalCreateCommentErrors[keyof InternalCreateCommentErrors];
3005
3138
 
3006
- export type InternalEditCommentResponses = {
3139
+ export type InternalCreateCommentResponses = {
3007
3140
  /**
3008
- * Returns the updated comment
3141
+ * Returns the created comment
3009
3142
  */
3010
3143
  200: {
3011
3144
  comment: {
@@ -3035,7 +3168,7 @@ export type InternalEditCommentResponses = {
3035
3168
  };
3036
3169
  };
3037
3170
 
3038
- export type InternalEditCommentResponse = InternalEditCommentResponses[keyof InternalEditCommentResponses];
3171
+ export type InternalCreateCommentResponse = InternalCreateCommentResponses[keyof InternalCreateCommentResponses];
3039
3172
 
3040
3173
  export type InternalResolveCommentData = {
3041
3174
  body?: never;
@@ -3272,7 +3405,9 @@ export type InternalDeleteReplyData = {
3272
3405
  commentId: string;
3273
3406
  replyId: string;
3274
3407
  };
3275
- query?: never;
3408
+ query?: {
3409
+ editorDazlUserId?: string;
3410
+ };
3276
3411
  url: '/project/{projectId}/comments/{commentId}/replies/{replyId}';
3277
3412
  };
3278
3413