@n8n/api-types 0.32.1 → 0.34.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.
Files changed (40) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/dto/index.d.ts +2 -0
  3. package/dist/dto/index.js +5 -1
  4. package/dist/dto/index.js.map +1 -1
  5. package/dist/dto/oidc/config.dto.d.ts +11 -0
  6. package/dist/dto/oidc/config.dto.js +14 -0
  7. package/dist/dto/oidc/config.dto.js.map +1 -0
  8. package/dist/dto/pagination/pagination.dto.d.ts +1 -1
  9. package/dist/dto/pagination/pagination.dto.js +6 -2
  10. package/dist/dto/pagination/pagination.dto.js.map +1 -1
  11. package/dist/dto/project/update-project.dto.d.ts +1 -0
  12. package/dist/dto/project/update-project.dto.js +1 -0
  13. package/dist/dto/project/update-project.dto.js.map +1 -1
  14. package/dist/dto/source-control/push-work-folder-request.dto.d.ts +23 -0
  15. package/dist/dto/user/settings-update-request.dto.d.ts +1 -0
  16. package/dist/dto/user/settings-update-request.dto.js +1 -0
  17. package/dist/dto/user/settings-update-request.dto.js.map +1 -1
  18. package/dist/dto/user/users-list-filter.dto.d.ts +19 -0
  19. package/dist/dto/user/users-list-filter.dto.js +69 -0
  20. package/dist/dto/user/users-list-filter.dto.js.map +1 -0
  21. package/dist/frontend-settings.d.ts +15 -7
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +4 -3
  24. package/dist/index.js.map +1 -1
  25. package/dist/schemas/insights.schema.d.ts +0 -1
  26. package/dist/schemas/insights.schema.js +2 -11
  27. package/dist/schemas/insights.schema.js.map +1 -1
  28. package/dist/schemas/project.schema.d.ts +1 -0
  29. package/dist/schemas/project.schema.js +2 -1
  30. package/dist/schemas/project.schema.js.map +1 -1
  31. package/dist/schemas/source-controlled-file.schema.d.ts +23 -0
  32. package/dist/schemas/source-controlled-file.schema.js +6 -0
  33. package/dist/schemas/source-controlled-file.schema.js.map +1 -1
  34. package/dist/schemas/user-settings.schema.d.ts +113 -0
  35. package/dist/schemas/user-settings.schema.js +26 -0
  36. package/dist/schemas/user-settings.schema.js.map +1 -0
  37. package/dist/schemas/user.schema.d.ts +419 -0
  38. package/dist/schemas/user.schema.js +38 -0
  39. package/dist/schemas/user.schema.js.map +1 -0
  40. package/package.json +5 -5
@@ -0,0 +1,113 @@
1
+ import { z } from 'zod';
2
+ export declare const npsSurveyRespondedSchema: z.ZodObject<{
3
+ lastShownAt: z.ZodNumber;
4
+ responded: z.ZodLiteral<true>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ lastShownAt: number;
7
+ responded: true;
8
+ }, {
9
+ lastShownAt: number;
10
+ responded: true;
11
+ }>;
12
+ export declare const npsSurveyWaitingSchema: z.ZodObject<{
13
+ lastShownAt: z.ZodNumber;
14
+ waitingForResponse: z.ZodLiteral<true>;
15
+ ignoredCount: z.ZodNumber;
16
+ }, "strip", z.ZodTypeAny, {
17
+ lastShownAt: number;
18
+ waitingForResponse: true;
19
+ ignoredCount: number;
20
+ }, {
21
+ lastShownAt: number;
22
+ waitingForResponse: true;
23
+ ignoredCount: number;
24
+ }>;
25
+ export declare const npsSurveySchema: z.ZodUnion<[z.ZodObject<{
26
+ lastShownAt: z.ZodNumber;
27
+ responded: z.ZodLiteral<true>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ lastShownAt: number;
30
+ responded: true;
31
+ }, {
32
+ lastShownAt: number;
33
+ responded: true;
34
+ }>, z.ZodObject<{
35
+ lastShownAt: z.ZodNumber;
36
+ waitingForResponse: z.ZodLiteral<true>;
37
+ ignoredCount: z.ZodNumber;
38
+ }, "strip", z.ZodTypeAny, {
39
+ lastShownAt: number;
40
+ waitingForResponse: true;
41
+ ignoredCount: number;
42
+ }, {
43
+ lastShownAt: number;
44
+ waitingForResponse: true;
45
+ ignoredCount: number;
46
+ }>]>;
47
+ export declare const userSettingsSchema: z.ZodObject<{
48
+ isOnboarded: z.ZodOptional<z.ZodBoolean>;
49
+ firstSuccessfulWorkflowId: z.ZodOptional<z.ZodString>;
50
+ userActivated: z.ZodOptional<z.ZodBoolean>;
51
+ userActivatedAt: z.ZodOptional<z.ZodNumber>;
52
+ allowSSOManualLogin: z.ZodOptional<z.ZodBoolean>;
53
+ npsSurvey: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
54
+ lastShownAt: z.ZodNumber;
55
+ responded: z.ZodLiteral<true>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ lastShownAt: number;
58
+ responded: true;
59
+ }, {
60
+ lastShownAt: number;
61
+ responded: true;
62
+ }>, z.ZodObject<{
63
+ lastShownAt: z.ZodNumber;
64
+ waitingForResponse: z.ZodLiteral<true>;
65
+ ignoredCount: z.ZodNumber;
66
+ }, "strip", z.ZodTypeAny, {
67
+ lastShownAt: number;
68
+ waitingForResponse: true;
69
+ ignoredCount: number;
70
+ }, {
71
+ lastShownAt: number;
72
+ waitingForResponse: true;
73
+ ignoredCount: number;
74
+ }>]>>;
75
+ easyAIWorkflowOnboarded: z.ZodOptional<z.ZodBoolean>;
76
+ userClaimedAiCredits: z.ZodOptional<z.ZodBoolean>;
77
+ dismissedCallouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ userActivated?: boolean | undefined;
80
+ allowSSOManualLogin?: boolean | undefined;
81
+ easyAIWorkflowOnboarded?: boolean | undefined;
82
+ dismissedCallouts?: Record<string, boolean> | undefined;
83
+ isOnboarded?: boolean | undefined;
84
+ firstSuccessfulWorkflowId?: string | undefined;
85
+ userActivatedAt?: number | undefined;
86
+ npsSurvey?: {
87
+ lastShownAt: number;
88
+ responded: true;
89
+ } | {
90
+ lastShownAt: number;
91
+ waitingForResponse: true;
92
+ ignoredCount: number;
93
+ } | undefined;
94
+ userClaimedAiCredits?: boolean | undefined;
95
+ }, {
96
+ userActivated?: boolean | undefined;
97
+ allowSSOManualLogin?: boolean | undefined;
98
+ easyAIWorkflowOnboarded?: boolean | undefined;
99
+ dismissedCallouts?: Record<string, boolean> | undefined;
100
+ isOnboarded?: boolean | undefined;
101
+ firstSuccessfulWorkflowId?: string | undefined;
102
+ userActivatedAt?: number | undefined;
103
+ npsSurvey?: {
104
+ lastShownAt: number;
105
+ responded: true;
106
+ } | {
107
+ lastShownAt: number;
108
+ waitingForResponse: true;
109
+ ignoredCount: number;
110
+ } | undefined;
111
+ userClaimedAiCredits?: boolean | undefined;
112
+ }>;
113
+ export type UserSettings = z.infer<typeof userSettingsSchema>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userSettingsSchema = exports.npsSurveySchema = exports.npsSurveyWaitingSchema = exports.npsSurveyRespondedSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.npsSurveyRespondedSchema = zod_1.z.object({
6
+ lastShownAt: zod_1.z.number(),
7
+ responded: zod_1.z.literal(true),
8
+ });
9
+ exports.npsSurveyWaitingSchema = zod_1.z.object({
10
+ lastShownAt: zod_1.z.number(),
11
+ waitingForResponse: zod_1.z.literal(true),
12
+ ignoredCount: zod_1.z.number(),
13
+ });
14
+ exports.npsSurveySchema = zod_1.z.union([exports.npsSurveyRespondedSchema, exports.npsSurveyWaitingSchema]);
15
+ exports.userSettingsSchema = zod_1.z.object({
16
+ isOnboarded: zod_1.z.boolean().optional(),
17
+ firstSuccessfulWorkflowId: zod_1.z.string().optional(),
18
+ userActivated: zod_1.z.boolean().optional(),
19
+ userActivatedAt: zod_1.z.number().optional(),
20
+ allowSSOManualLogin: zod_1.z.boolean().optional(),
21
+ npsSurvey: exports.npsSurveySchema.optional(),
22
+ easyAIWorkflowOnboarded: zod_1.z.boolean().optional(),
23
+ userClaimedAiCredits: zod_1.z.boolean().optional(),
24
+ dismissedCallouts: zod_1.z.record(zod_1.z.boolean()).optional(),
25
+ });
26
+ //# sourceMappingURL=user-settings.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-settings.schema.js","sourceRo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export declare const ROLE: {
3
+ readonly Owner: "global:owner";
4
+ readonly Member: "global:member";
5
+ readonly Admin: "global:admin";
6
+ readonly Default: "default";
7
+ };
8
+ export type Role = (typeof ROLE)[keyof typeof ROLE];
9
+ export declare const roleSchema: z.ZodEnum<[Role, ...Role[]]>;
10
+ export declare const userProjectSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ role: z.ZodEnum<["project:personalOwner", "project:admin", "project:editor", "project:viewer"]>;
13
+ name: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ id: string;
16
+ name: string;
17
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
18
+ }, {
19
+ id: string;
20
+ name: string;
21
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
22
+ }>;
23
+ export declare const userListItemSchema: z.ZodObject<{
24
+ id: z.ZodString;
25
+ firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ role: z.ZodOptional<z.ZodEnum<[Role, ...Role[]]>>;
29
+ isPending: z.ZodOptional<z.ZodBoolean>;
30
+ isOwner: z.ZodOptional<z.ZodBoolean>;
31
+ signInType: z.ZodOptional<z.ZodString>;
32
+ settings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
33
+ isOnboarded: z.ZodOptional<z.ZodBoolean>;
34
+ firstSuccessfulWorkflowId: z.ZodOptional<z.ZodString>;
35
+ userActivated: z.ZodOptional<z.ZodBoolean>;
36
+ userActivatedAt: z.ZodOptional<z.ZodNumber>;
37
+ allowSSOManualLogin: z.ZodOptional<z.ZodBoolean>;
38
+ npsSurvey: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
39
+ lastShownAt: z.ZodNumber;
40
+ responded: z.ZodLiteral<true>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ lastShownAt: number;
43
+ responded: true;
44
+ }, {
45
+ lastShownAt: number;
46
+ responded: true;
47
+ }>, z.ZodObject<{
48
+ lastShownAt: z.ZodNumber;
49
+ waitingForResponse: z.ZodLiteral<true>;
50
+ ignoredCount: z.ZodNumber;
51
+ }, "strip", z.ZodTypeAny, {
52
+ lastShownAt: number;
53
+ waitingForResponse: true;
54
+ ignoredCount: number;
55
+ }, {
56
+ lastShownAt: number;
57
+ waitingForResponse: true;
58
+ ignoredCount: number;
59
+ }>]>>;
60
+ easyAIWorkflowOnboarded: z.ZodOptional<z.ZodBoolean>;
61
+ userClaimedAiCredits: z.ZodOptional<z.ZodBoolean>;
62
+ dismissedCallouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ userActivated?: boolean | undefined;
65
+ allowSSOManualLogin?: boolean | undefined;
66
+ easyAIWorkflowOnboarded?: boolean | undefined;
67
+ dismissedCallouts?: Record<string, boolean> | undefined;
68
+ isOnboarded?: boolean | undefined;
69
+ firstSuccessfulWorkflowId?: string | undefined;
70
+ userActivatedAt?: number | undefined;
71
+ npsSurvey?: {
72
+ lastShownAt: number;
73
+ responded: true;
74
+ } | {
75
+ lastShownAt: number;
76
+ waitingForResponse: true;
77
+ ignoredCount: number;
78
+ } | undefined;
79
+ userClaimedAiCredits?: boolean | undefined;
80
+ }, {
81
+ userActivated?: boolean | undefined;
82
+ allowSSOManualLogin?: boolean | undefined;
83
+ easyAIWorkflowOnboarded?: boolean | undefined;
84
+ dismissedCallouts?: Record<string, boolean> | undefined;
85
+ isOnboarded?: boolean | undefined;
86
+ firstSuccessfulWorkflowId?: string | undefined;
87
+ userActivatedAt?: number | undefined;
88
+ npsSurvey?: {
89
+ lastShownAt: number;
90
+ responded: true;
91
+ } | {
92
+ lastShownAt: number;
93
+ waitingForResponse: true;
94
+ ignoredCount: number;
95
+ } | undefined;
96
+ userClaimedAiCredits?: boolean | undefined;
97
+ }>>>;
98
+ personalizationAnswers: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
99
+ lastActive: z.ZodOptional<z.ZodString>;
100
+ projectRelations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
101
+ id: z.ZodString;
102
+ role: z.ZodEnum<["project:personalOwner", "project:admin", "project:editor", "project:viewer"]>;
103
+ name: z.ZodString;
104
+ }, "strip", z.ZodTypeAny, {
105
+ id: string;
106
+ name: string;
107
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
108
+ }, {
109
+ id: string;
110
+ name: string;
111
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
112
+ }>, "many">>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ email?: string | null | undefined;
116
+ role?: Role | undefined;
117
+ firstName?: string | null | undefined;
118
+ lastName?: string | null | undefined;
119
+ isOwner?: boolean | undefined;
120
+ projectRelations?: {
121
+ id: string;
122
+ name: string;
123
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
124
+ }[] | null | undefined;
125
+ isPending?: boolean | undefined;
126
+ signInType?: string | undefined;
127
+ settings?: {
128
+ userActivated?: boolean | undefined;
129
+ allowSSOManualLogin?: boolean | undefined;
130
+ easyAIWorkflowOnboarded?: boolean | undefined;
131
+ dismissedCallouts?: Record<string, boolean> | undefined;
132
+ isOnboarded?: boolean | undefined;
133
+ firstSuccessfulWorkflowId?: string | undefined;
134
+ userActivatedAt?: number | undefined;
135
+ npsSurvey?: {
136
+ lastShownAt: number;
137
+ responded: true;
138
+ } | {
139
+ lastShownAt: number;
140
+ waitingForResponse: true;
141
+ ignoredCount: number;
142
+ } | undefined;
143
+ userClaimedAiCredits?: boolean | undefined;
144
+ } | null | undefined;
145
+ personalizationAnswers?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
146
+ lastActive?: string | undefined;
147
+ }, {
148
+ id: string;
149
+ email?: string | null | undefined;
150
+ role?: Role | undefined;
151
+ firstName?: string | null | undefined;
152
+ lastName?: string | null | undefined;
153
+ isOwner?: boolean | undefined;
154
+ projectRelations?: {
155
+ id: string;
156
+ name: string;
157
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
158
+ }[] | null | undefined;
159
+ isPending?: boolean | undefined;
160
+ signInType?: string | undefined;
161
+ settings?: {
162
+ userActivated?: boolean | undefined;
163
+ allowSSOManualLogin?: boolean | undefined;
164
+ easyAIWorkflowOnboarded?: boolean | undefined;
165
+ dismissedCallouts?: Record<string, boolean> | undefined;
166
+ isOnboarded?: boolean | undefined;
167
+ firstSuccessfulWorkflowId?: string | undefined;
168
+ userActivatedAt?: number | undefined;
169
+ npsSurvey?: {
170
+ lastShownAt: number;
171
+ responded: true;
172
+ } | {
173
+ lastShownAt: number;
174
+ waitingForResponse: true;
175
+ ignoredCount: number;
176
+ } | undefined;
177
+ userClaimedAiCredits?: boolean | undefined;
178
+ } | null | undefined;
179
+ personalizationAnswers?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
180
+ lastActive?: string | undefined;
181
+ }>;
182
+ export declare const usersListSchema: z.ZodObject<{
183
+ count: z.ZodNumber;
184
+ items: z.ZodArray<z.ZodObject<{
185
+ id: z.ZodString;
186
+ firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
187
+ lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
188
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ role: z.ZodOptional<z.ZodEnum<[Role, ...Role[]]>>;
190
+ isPending: z.ZodOptional<z.ZodBoolean>;
191
+ isOwner: z.ZodOptional<z.ZodBoolean>;
192
+ signInType: z.ZodOptional<z.ZodString>;
193
+ settings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
194
+ isOnboarded: z.ZodOptional<z.ZodBoolean>;
195
+ firstSuccessfulWorkflowId: z.ZodOptional<z.ZodString>;
196
+ userActivated: z.ZodOptional<z.ZodBoolean>;
197
+ userActivatedAt: z.ZodOptional<z.ZodNumber>;
198
+ allowSSOManualLogin: z.ZodOptional<z.ZodBoolean>;
199
+ npsSurvey: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
200
+ lastShownAt: z.ZodNumber;
201
+ responded: z.ZodLiteral<true>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ lastShownAt: number;
204
+ responded: true;
205
+ }, {
206
+ lastShownAt: number;
207
+ responded: true;
208
+ }>, z.ZodObject<{
209
+ lastShownAt: z.ZodNumber;
210
+ waitingForResponse: z.ZodLiteral<true>;
211
+ ignoredCount: z.ZodNumber;
212
+ }, "strip", z.ZodTypeAny, {
213
+ lastShownAt: number;
214
+ waitingForResponse: true;
215
+ ignoredCount: number;
216
+ }, {
217
+ lastShownAt: number;
218
+ waitingForResponse: true;
219
+ ignoredCount: number;
220
+ }>]>>;
221
+ easyAIWorkflowOnboarded: z.ZodOptional<z.ZodBoolean>;
222
+ userClaimedAiCredits: z.ZodOptional<z.ZodBoolean>;
223
+ dismissedCallouts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ userActivated?: boolean | undefined;
226
+ allowSSOManualLogin?: boolean | undefined;
227
+ easyAIWorkflowOnboarded?: boolean | undefined;
228
+ dismissedCallouts?: Record<string, boolean> | undefined;
229
+ isOnboarded?: boolean | undefined;
230
+ firstSuccessfulWorkflowId?: string | undefined;
231
+ userActivatedAt?: number | undefined;
232
+ npsSurvey?: {
233
+ lastShownAt: number;
234
+ responded: true;
235
+ } | {
236
+ lastShownAt: number;
237
+ waitingForResponse: true;
238
+ ignoredCount: number;
239
+ } | undefined;
240
+ userClaimedAiCredits?: boolean | undefined;
241
+ }, {
242
+ userActivated?: boolean | undefined;
243
+ allowSSOManualLogin?: boolean | undefined;
244
+ easyAIWorkflowOnboarded?: boolean | undefined;
245
+ dismissedCallouts?: Record<string, boolean> | undefined;
246
+ isOnboarded?: boolean | undefined;
247
+ firstSuccessfulWorkflowId?: string | undefined;
248
+ userActivatedAt?: number | undefined;
249
+ npsSurvey?: {
250
+ lastShownAt: number;
251
+ responded: true;
252
+ } | {
253
+ lastShownAt: number;
254
+ waitingForResponse: true;
255
+ ignoredCount: number;
256
+ } | undefined;
257
+ userClaimedAiCredits?: boolean | undefined;
258
+ }>>>;
259
+ personalizationAnswers: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
260
+ lastActive: z.ZodOptional<z.ZodString>;
261
+ projectRelations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
262
+ id: z.ZodString;
263
+ role: z.ZodEnum<["project:personalOwner", "project:admin", "project:editor", "project:viewer"]>;
264
+ name: z.ZodString;
265
+ }, "strip", z.ZodTypeAny, {
266
+ id: string;
267
+ name: string;
268
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
269
+ }, {
270
+ id: string;
271
+ name: string;
272
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
273
+ }>, "many">>>;
274
+ }, "strip", z.ZodTypeAny, {
275
+ id: string;
276
+ email?: string | null | undefined;
277
+ role?: Role | undefined;
278
+ firstName?: string | null | undefined;
279
+ lastName?: string | null | undefined;
280
+ isOwner?: boolean | undefined;
281
+ projectRelations?: {
282
+ id: string;
283
+ name: string;
284
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
285
+ }[] | null | undefined;
286
+ isPending?: boolean | undefined;
287
+ signInType?: string | undefined;
288
+ settings?: {
289
+ userActivated?: boolean | undefined;
290
+ allowSSOManualLogin?: boolean | undefined;
291
+ easyAIWorkflowOnboarded?: boolean | undefined;
292
+ dismissedCallouts?: Record<string, boolean> | undefined;
293
+ isOnboarded?: boolean | undefined;
294
+ firstSuccessfulWorkflowId?: string | undefined;
295
+ userActivatedAt?: number | undefined;
296
+ npsSurvey?: {
297
+ lastShownAt: number;
298
+ responded: true;
299
+ } | {
300
+ lastShownAt: number;
301
+ waitingForResponse: true;
302
+ ignoredCount: number;
303
+ } | undefined;
304
+ userClaimedAiCredits?: boolean | undefined;
305
+ } | null | undefined;
306
+ personalizationAnswers?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
307
+ lastActive?: string | undefined;
308
+ }, {
309
+ id: string;
310
+ email?: string | null | undefined;
311
+ role?: Role | undefined;
312
+ firstName?: string | null | undefined;
313
+ lastName?: string | null | undefined;
314
+ isOwner?: boolean | undefined;
315
+ projectRelations?: {
316
+ id: string;
317
+ name: string;
318
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
319
+ }[] | null | undefined;
320
+ isPending?: boolean | undefined;
321
+ signInType?: string | undefined;
322
+ settings?: {
323
+ userActivated?: boolean | undefined;
324
+ allowSSOManualLogin?: boolean | undefined;
325
+ easyAIWorkflowOnboarded?: boolean | undefined;
326
+ dismissedCallouts?: Record<string, boolean> | undefined;
327
+ isOnboarded?: boolean | undefined;
328
+ firstSuccessfulWorkflowId?: string | undefined;
329
+ userActivatedAt?: number | undefined;
330
+ npsSurvey?: {
331
+ lastShownAt: number;
332
+ responded: true;
333
+ } | {
334
+ lastShownAt: number;
335
+ waitingForResponse: true;
336
+ ignoredCount: number;
337
+ } | undefined;
338
+ userClaimedAiCredits?: boolean | undefined;
339
+ } | null | undefined;
340
+ personalizationAnswers?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
341
+ lastActive?: string | undefined;
342
+ }>, "many">;
343
+ }, "strip", z.ZodTypeAny, {
344
+ count: number;
345
+ items: {
346
+ id: string;
347
+ email?: string | null | undefined;
348
+ role?: Role | undefined;
349
+ firstName?: string | null | undefined;
350
+ lastName?: string | null | undefined;
351
+ isOwner?: boolean | undefined;
352
+ projectRelations?: {
353
+ id: string;
354
+ name: string;
355
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
356
+ }[] | null | undefined;
357
+ isPending?: boolean | undefined;
358
+ signInType?: string | undefined;
359
+ settings?: {
360
+ userActivated?: boolean | undefined;
361
+ allowSSOManualLogin?: boolean | undefined;
362
+ easyAIWorkflowOnboarded?: boolean | undefined;
363
+ dismissedCallouts?: Record<string, boolean> | undefined;
364
+ isOnboarded?: boolean | undefined;
365
+ firstSuccessfulWorkflowId?: string | undefined;
366
+ userActivatedAt?: number | undefined;
367
+ npsSurvey?: {
368
+ lastShownAt: number;
369
+ responded: true;
370
+ } | {
371
+ lastShownAt: number;
372
+ waitingForResponse: true;
373
+ ignoredCount: number;
374
+ } | undefined;
375
+ userClaimedAiCredits?: boolean | undefined;
376
+ } | null | undefined;
377
+ personalizationAnswers?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
378
+ lastActive?: string | undefined;
379
+ }[];
380
+ }, {
381
+ count: number;
382
+ items: {
383
+ id: string;
384
+ email?: string | null | undefined;
385
+ role?: Role | undefined;
386
+ firstName?: string | null | undefined;
387
+ lastName?: string | null | undefined;
388
+ isOwner?: boolean | undefined;
389
+ projectRelations?: {
390
+ id: string;
391
+ name: string;
392
+ role: "project:personalOwner" | "project:admin" | "project:editor" | "project:viewer";
393
+ }[] | null | undefined;
394
+ isPending?: boolean | undefined;
395
+ signInType?: string | undefined;
396
+ settings?: {
397
+ userActivated?: boolean | undefined;
398
+ allowSSOManualLogin?: boolean | undefined;
399
+ easyAIWorkflowOnboarded?: boolean | undefined;
400
+ dismissedCallouts?: Record<string, boolean> | undefined;
401
+ isOnboarded?: boolean | undefined;
402
+ firstSuccessfulWorkflowId?: string | undefined;
403
+ userActivatedAt?: number | undefined;
404
+ npsSurvey?: {
405
+ lastShownAt: number;
406
+ responded: true;
407
+ } | {
408
+ lastShownAt: number;
409
+ waitingForResponse: true;
410
+ ignoredCount: number;
411
+ } | undefined;
412
+ userClaimedAiCredits?: boolean | undefined;
413
+ } | null | undefined;
414
+ personalizationAnswers?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
415
+ lastActive?: string | undefined;
416
+ }[];
417
+ }>;
418
+ export type User = z.infer<typeof userListItemSchema>;
419
+ export type UsersList = z.infer<typeof usersListSchema>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usersListSchema = exports.userListItemSchema = exports.userProjectSchema = exports.roleSchema = exports.ROLE = void 0;
4
+ const permissions_1 = require("@n8n/permissions");
5
+ const zod_1 = require("zod");
6
+ const user_settings_schema_1 = require("./user-settings.schema");
7
+ exports.ROLE = {
8
+ Owner: 'global:owner',
9
+ Member: 'global:member',
10
+ Admin: 'global:admin',
11
+ Default: 'default',
12
+ };
13
+ const roleValuesForSchema = Object.values(exports.ROLE);
14
+ exports.roleSchema = zod_1.z.enum(roleValuesForSchema);
15
+ exports.userProjectSchema = zod_1.z.object({
16
+ id: zod_1.z.string(),
17
+ role: permissions_1.projectRoleSchema,
18
+ name: zod_1.z.string(),
19
+ });
20
+ exports.userListItemSchema = zod_1.z.object({
21
+ id: zod_1.z.string(),
22
+ firstName: zod_1.z.string().nullable().optional(),
23
+ lastName: zod_1.z.string().nullable().optional(),
24
+ email: zod_1.z.string().email().nullable().optional(),
25
+ role: exports.roleSchema.optional(),
26
+ isPending: zod_1.z.boolean().optional(),
27
+ isOwner: zod_1.z.boolean().optional(),
28
+ signInType: zod_1.z.string().optional(),
29
+ settings: user_settings_schema_1.userSettingsSchema.nullable().optional(),
30
+ personalizationAnswers: zod_1.z.object({}).passthrough().nullable().optional(),
31
+ lastActive: zod_1.z.string().optional(),
32
+ projectRelations: zod_1.z.array(exports.userProjectSchema).nullable().optional(),
33
+ });
34
+ exports.usersListSchema = zod_1.z.object({
35
+ count: zod_1.z.number(),
36
+ items: zod_1.z.array(exports.userListItemSchema),
37
+ });
38
+ //# sourceMappingURL=user.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.sch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AAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,0BAAkB,CAAC;CAClC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/api-types",
3
- "version": "0.32.1",
3
+ "version": "0.34.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "src/index.ts",
6
6
  "types": "dist/index.d.ts",
@@ -11,14 +11,14 @@
11
11
  ],
12
12
  "devDependencies": {
13
13
  "@n8n/typescript-config": "1.2.0",
14
- "@n8n/config": "1.42.0"
14
+ "@n8n/config": "1.43.0"
15
15
  },
16
16
  "dependencies": {
17
17
  "xss": "1.0.15",
18
- "zod": "3.24.1",
18
+ "zod": "3.25.67",
19
19
  "zod-class": "0.0.16",
20
- "n8n-workflow": "1.95.1",
21
- "@n8n/permissions": "0.27.0"
20
+ "n8n-workflow": "1.97.0",
21
+ "@n8n/permissions": "0.28.0"
22
22
  },
23
23
  "license": "SEE LICENSE IN LICENSE.md",
24
24
  "homepage": "https://n8n.io",