@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.
@@ -79,11 +79,24 @@ export type ProjectRaw = {
79
79
  id: string;
80
80
  name: string;
81
81
  userId: number;
82
+ dazlUserId: string | null;
82
83
  createdAt: string;
83
84
  lastOpenedAt: string | null;
84
85
  latestScreenshot: string | null;
85
86
  originTemplateId: string | null;
86
87
  archivedAt: string | null;
88
+ members: Array<{
89
+ role: 'admin' | 'contributor' | 'viewer';
90
+ type: 'user';
91
+ /**
92
+ * Dazl ID for the type = "user"
93
+ */
94
+ id: string;
95
+ /**
96
+ * Time when it was updated in milliseconds since epoch
97
+ */
98
+ updatedAt?: number;
99
+ }>;
87
100
  };
88
101
  export type OwnerDazlId = {
89
102
  ownerDazlId: string;
@@ -119,51 +132,53 @@ export type UploadConfiguration = {
119
132
  };
120
133
  export type MediaFileList = {
121
134
  /**
122
- * Token for fetching the next page, undefined if no more pages
135
+ * Array of media items
123
136
  */
124
- nextPageToken?: string;
137
+ items: Array<MediaItem>;
125
138
  /**
126
- * Array of file descriptors
139
+ * Cursor token for fetching the next page, null if no more pages
127
140
  */
128
- files: Array<MediaFile>;
129
- };
130
- export type MediaFile = {
141
+ nextCursor: string | null;
131
142
  /**
132
- * Unique file identifier
143
+ * Total number of matching items (independent of pagination)
133
144
  */
134
- id: string;
145
+ total: number;
146
+ };
147
+ export type MediaItem = {
135
148
  /**
136
- * File path within the project
149
+ * Unique media identifier
137
150
  */
138
- path: string;
151
+ id: string;
139
152
  /**
140
153
  * MIME type of the file
141
154
  */
142
155
  mimeType: string;
143
156
  /**
144
- * File type: '-' for file, 'd' for directory
157
+ * URL where the file is accessible
145
158
  */
146
- type: '-' | 'd';
159
+ url: string;
147
160
  /**
148
- * File size in bytes, null for directories
161
+ * Project identifier
149
162
  */
150
- size: number | null;
163
+ projectId: string;
151
164
  /**
152
- * Access control level of the file
165
+ * Git commit hash, null if not a screenshot
153
166
  */
154
- acl: 'public' | 'private';
167
+ gitCommit: string | null;
155
168
  /**
156
- * Content hash of the file
169
+ * Additional metadata
157
170
  */
158
- hash: string | null;
171
+ descriptor: {
172
+ [key: string]: unknown;
173
+ } | null;
159
174
  /**
160
175
  * ISO 8601 creation timestamp
161
176
  */
162
- dateCreated: string;
177
+ createdAt: string;
163
178
  /**
164
179
  * ISO 8601 last update timestamp
165
180
  */
166
- dateUpdated: string;
181
+ updatedAt: string;
167
182
  };
168
183
  export type ProjectWithScreenshot = {
169
184
  /**
@@ -175,9 +190,9 @@ export type ProjectWithScreenshot = {
175
190
  */
176
191
  name: string;
177
192
  /**
178
- * User ID who owns the project
193
+ * User's Dazl ID
179
194
  */
180
- userId: number;
195
+ dazlUserId: string;
181
196
  /**
182
197
  * ISO 8601 creation timestamp
183
198
  */
@@ -217,8 +232,6 @@ export type ProjectWithScreenshot = {
217
232
  */
218
233
  createdAt: string;
219
234
  id: string;
220
- projectId?: string;
221
- userId?: number;
222
235
  } | null;
223
236
  };
224
237
  export type Screenshot = {
@@ -234,6 +247,14 @@ export type Screenshot = {
234
247
  * URL where the screenshot is accessible
235
248
  */
236
249
  url: string;
250
+ /**
251
+ * Project identifier
252
+ */
253
+ projectId: string;
254
+ /**
255
+ * User's Dazl ID
256
+ */
257
+ dazlUserId: string;
237
258
  /**
238
259
  * Git commit hash when screenshot was taken
239
260
  */
@@ -2084,6 +2105,298 @@ export type GetUserProjectsResponses = {
2084
2105
  };
2085
2106
  };
2086
2107
  export type GetUserProjectsResponse = GetUserProjectsResponses[keyof GetUserProjectsResponses];
2108
+ export type InviteProjectMemberData = {
2109
+ body: {
2110
+ role: 'admin' | 'contributor' | 'viewer';
2111
+ email: string;
2112
+ invitedByDazlId: string;
2113
+ };
2114
+ path: {
2115
+ projectId: string;
2116
+ };
2117
+ query?: never;
2118
+ url: '/project/{projectId}/members/invite';
2119
+ };
2120
+ export type InviteProjectMemberErrors = {
2121
+ /**
2122
+ * Bad request - Invalid parameters or malformed JSON
2123
+ */
2124
+ 400: {
2125
+ message: string;
2126
+ issues?: string;
2127
+ };
2128
+ /**
2129
+ * Unauthorized
2130
+ */
2131
+ 401: ErrorResponse;
2132
+ /**
2133
+ * Forbidden
2134
+ */
2135
+ 403: ErrorResponse;
2136
+ /**
2137
+ * Not Found
2138
+ */
2139
+ 404: ErrorResponse;
2140
+ /**
2141
+ * Conflict
2142
+ */
2143
+ 409: ErrorResponse;
2144
+ /**
2145
+ * Internal server error
2146
+ */
2147
+ 500: ErrorResponse;
2148
+ /**
2149
+ * Service Unavailable
2150
+ */
2151
+ 503: ErrorResponse;
2152
+ };
2153
+ export type InviteProjectMemberError = InviteProjectMemberErrors[keyof InviteProjectMemberErrors];
2154
+ export type InviteProjectMemberResponses = {
2155
+ /**
2156
+ * Returns the invitation token, or null if user was auto-added to project
2157
+ */
2158
+ 200: {
2159
+ token: string | null;
2160
+ };
2161
+ };
2162
+ export type InviteProjectMemberResponse = InviteProjectMemberResponses[keyof InviteProjectMemberResponses];
2163
+ export type AcceptProjectInvitationData = {
2164
+ body: {
2165
+ token: string;
2166
+ userDazlId: string;
2167
+ };
2168
+ path?: never;
2169
+ query?: never;
2170
+ url: '/project/members/accept-invitation';
2171
+ };
2172
+ export type AcceptProjectInvitationErrors = {
2173
+ /**
2174
+ * Bad request - Invalid parameters or malformed JSON
2175
+ */
2176
+ 400: {
2177
+ message: string;
2178
+ issues?: string;
2179
+ };
2180
+ /**
2181
+ * Unauthorized
2182
+ */
2183
+ 401: ErrorResponse;
2184
+ /**
2185
+ * Forbidden
2186
+ */
2187
+ 403: ErrorResponse;
2188
+ /**
2189
+ * Not Found
2190
+ */
2191
+ 404: ErrorResponse;
2192
+ /**
2193
+ * Conflict
2194
+ */
2195
+ 409: ErrorResponse;
2196
+ /**
2197
+ * Internal server error
2198
+ */
2199
+ 500: ErrorResponse;
2200
+ /**
2201
+ * Service Unavailable
2202
+ */
2203
+ 503: ErrorResponse;
2204
+ };
2205
+ export type AcceptProjectInvitationError = AcceptProjectInvitationErrors[keyof AcceptProjectInvitationErrors];
2206
+ export type AcceptProjectInvitationResponses = {
2207
+ /**
2208
+ * Acknowledges that the invitation was accepted
2209
+ */
2210
+ 200: {
2211
+ status: 'accepted';
2212
+ };
2213
+ };
2214
+ export type AcceptProjectInvitationResponse = AcceptProjectInvitationResponses[keyof AcceptProjectInvitationResponses];
2215
+ export type GetProjectCollaboratorsData = {
2216
+ body?: never;
2217
+ path: {
2218
+ projectId: string;
2219
+ };
2220
+ query: {
2221
+ userDazlId: string;
2222
+ };
2223
+ url: '/project/{projectId}/collaborators';
2224
+ };
2225
+ export type GetProjectCollaboratorsErrors = {
2226
+ /**
2227
+ * Bad request - Invalid parameters or malformed JSON
2228
+ */
2229
+ 400: {
2230
+ message: string;
2231
+ issues?: string;
2232
+ };
2233
+ /**
2234
+ * Unauthorized
2235
+ */
2236
+ 401: ErrorResponse;
2237
+ /**
2238
+ * Forbidden
2239
+ */
2240
+ 403: ErrorResponse;
2241
+ /**
2242
+ * Not Found
2243
+ */
2244
+ 404: ErrorResponse;
2245
+ /**
2246
+ * Conflict
2247
+ */
2248
+ 409: ErrorResponse;
2249
+ /**
2250
+ * Internal server error
2251
+ */
2252
+ 500: ErrorResponse;
2253
+ /**
2254
+ * Service Unavailable
2255
+ */
2256
+ 503: ErrorResponse;
2257
+ };
2258
+ export type GetProjectCollaboratorsError = GetProjectCollaboratorsErrors[keyof GetProjectCollaboratorsErrors];
2259
+ export type GetProjectCollaboratorsResponses = {
2260
+ /**
2261
+ * Returns the list of project collaborators: both members and invitations
2262
+ */
2263
+ 200: {
2264
+ owner: {
2265
+ /**
2266
+ * Dazl ID for the type = "user"
2267
+ */
2268
+ id: string;
2269
+ role: 'admin' | 'contributor' | 'viewer' | 'owner';
2270
+ email: string;
2271
+ name?: string;
2272
+ picture?: string;
2273
+ };
2274
+ members: Array<{
2275
+ /**
2276
+ * Dazl ID for the type = "user"
2277
+ */
2278
+ id: string;
2279
+ role: 'admin' | 'contributor' | 'viewer' | 'owner';
2280
+ email: string;
2281
+ name?: string;
2282
+ picture?: string;
2283
+ }>;
2284
+ invited: Array<{
2285
+ role: 'admin' | 'contributor' | 'viewer';
2286
+ email?: string;
2287
+ id: string;
2288
+ }>;
2289
+ };
2290
+ };
2291
+ export type GetProjectCollaboratorsResponse = GetProjectCollaboratorsResponses[keyof GetProjectCollaboratorsResponses];
2292
+ export type DeleteProjectMemberData = {
2293
+ body?: never;
2294
+ path: {
2295
+ projectId: string;
2296
+ memberId: string;
2297
+ };
2298
+ query: {
2299
+ userDazlId: string;
2300
+ };
2301
+ url: '/project/{projectId}/members/{memberId}';
2302
+ };
2303
+ export type DeleteProjectMemberErrors = {
2304
+ /**
2305
+ * Bad request - Invalid parameters or malformed JSON
2306
+ */
2307
+ 400: {
2308
+ message: string;
2309
+ issues?: string;
2310
+ };
2311
+ /**
2312
+ * Unauthorized
2313
+ */
2314
+ 401: ErrorResponse;
2315
+ /**
2316
+ * Forbidden
2317
+ */
2318
+ 403: ErrorResponse;
2319
+ /**
2320
+ * Not Found
2321
+ */
2322
+ 404: ErrorResponse;
2323
+ /**
2324
+ * Conflict
2325
+ */
2326
+ 409: ErrorResponse;
2327
+ /**
2328
+ * Internal server error
2329
+ */
2330
+ 500: ErrorResponse;
2331
+ /**
2332
+ * Service Unavailable
2333
+ */
2334
+ 503: ErrorResponse;
2335
+ };
2336
+ export type DeleteProjectMemberError = DeleteProjectMemberErrors[keyof DeleteProjectMemberErrors];
2337
+ export type DeleteProjectMemberResponses = {
2338
+ /**
2339
+ * Acknowledges that the project member was deleted
2340
+ */
2341
+ 200: {
2342
+ status: 'deleted';
2343
+ };
2344
+ };
2345
+ export type DeleteProjectMemberResponse = DeleteProjectMemberResponses[keyof DeleteProjectMemberResponses];
2346
+ export type DeleteProjectInvitationData = {
2347
+ body?: never;
2348
+ path: {
2349
+ projectId: string;
2350
+ invitationId: string;
2351
+ };
2352
+ query: {
2353
+ userDazlId: string;
2354
+ };
2355
+ url: '/project/{projectId}/invitations/{invitationId}';
2356
+ };
2357
+ export type DeleteProjectInvitationErrors = {
2358
+ /**
2359
+ * Bad request - Invalid parameters or malformed JSON
2360
+ */
2361
+ 400: {
2362
+ message: string;
2363
+ issues?: string;
2364
+ };
2365
+ /**
2366
+ * Unauthorized
2367
+ */
2368
+ 401: ErrorResponse;
2369
+ /**
2370
+ * Forbidden
2371
+ */
2372
+ 403: ErrorResponse;
2373
+ /**
2374
+ * Not Found
2375
+ */
2376
+ 404: ErrorResponse;
2377
+ /**
2378
+ * Conflict
2379
+ */
2380
+ 409: ErrorResponse;
2381
+ /**
2382
+ * Internal server error
2383
+ */
2384
+ 500: ErrorResponse;
2385
+ /**
2386
+ * Service Unavailable
2387
+ */
2388
+ 503: ErrorResponse;
2389
+ };
2390
+ export type DeleteProjectInvitationError = DeleteProjectInvitationErrors[keyof DeleteProjectInvitationErrors];
2391
+ export type DeleteProjectInvitationResponses = {
2392
+ /**
2393
+ * Acknowledges that the project invitation was deleted
2394
+ */
2395
+ 200: {
2396
+ status: 'deleted';
2397
+ };
2398
+ };
2399
+ export type DeleteProjectInvitationResponse = DeleteProjectInvitationResponses[keyof DeleteProjectInvitationResponses];
2087
2400
  export type GetPublicTemplatesData = {
2088
2401
  body?: never;
2089
2402
  path?: never;
@@ -2504,29 +2817,17 @@ export type ListFilesData = {
2504
2817
  */
2505
2818
  projectId: string;
2506
2819
  /**
2507
- * Path within the project to list files from
2508
- */
2509
- path?: string;
2510
- /**
2511
- * Filter by type: '-' for files, 'd' for directories
2512
- */
2513
- type?: '-' | 'd';
2514
- /**
2515
- * Field to order results by
2820
+ * Filter by MIME type prefix (e.g., 'image/' for all images)
2516
2821
  */
2517
- orderBy?: 'dateUpdated' | 'name';
2822
+ mimeType?: string;
2518
2823
  /**
2519
- * Sort direction
2824
+ * Cursor token for fetching the next page of results
2520
2825
  */
2521
- orderDirection?: 'asc' | 'desc';
2826
+ cursor?: string;
2522
2827
  /**
2523
2828
  * Number of items per page
2524
2829
  */
2525
2830
  pageSize?: number;
2526
- /**
2527
- * Token for fetching the next page of results
2528
- */
2529
- nextPageToken?: string;
2530
2831
  };
2531
2832
  url: '/media/list';
2532
2833
  };