@bubblelab/shared-schemas 0.1.35 → 0.1.37
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/dist/bubbleflow-schema.d.ts +83 -8
- package/dist/bubbleflow-schema.d.ts.map +1 -1
- package/dist/credential-schema.d.ts +18 -18
- package/dist/database-definition-schema.d.ts +4 -4
- package/dist/generate-bubbleflow-schema.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +813 -493
- package/dist/index.js.map +1 -1
- package/dist/organization-schema.d.ts +274 -0
- package/dist/organization-schema.d.ts.map +1 -0
- package/dist/permission-schema.d.ts +267 -0
- package/dist/permission-schema.d.ts.map +1 -0
- package/dist/subscription-status-schema.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for organization management
|
|
3
|
+
* These are shared between frontend and backend
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@hono/zod-openapi';
|
|
6
|
+
export declare const orgRoleSchema: z.ZodEnum<["owner", "admin", "member"]>;
|
|
7
|
+
export type OrgRole = z.infer<typeof orgRoleSchema>;
|
|
8
|
+
export declare const orgTypeSchema: z.ZodEnum<["personal", "organization"]>;
|
|
9
|
+
export type OrgType = z.infer<typeof orgTypeSchema>;
|
|
10
|
+
export declare const organizationSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodNumber;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
slug: z.ZodString;
|
|
14
|
+
type: z.ZodEnum<["personal", "organization"]>;
|
|
15
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
16
|
+
memberCount: z.ZodNumber;
|
|
17
|
+
createdAt: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
role: "owner" | "admin" | "member";
|
|
20
|
+
name: string;
|
|
21
|
+
type: "personal" | "organization";
|
|
22
|
+
id: number;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
memberCount: number;
|
|
26
|
+
}, {
|
|
27
|
+
role: "owner" | "admin" | "member";
|
|
28
|
+
name: string;
|
|
29
|
+
type: "personal" | "organization";
|
|
30
|
+
id: number;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
slug: string;
|
|
33
|
+
memberCount: number;
|
|
34
|
+
}>;
|
|
35
|
+
export type Organization = z.infer<typeof organizationSchema>;
|
|
36
|
+
export declare const organizationDetailSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodNumber;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
slug: z.ZodString;
|
|
40
|
+
type: z.ZodEnum<["personal", "organization"]>;
|
|
41
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
42
|
+
memberCount: z.ZodNumber;
|
|
43
|
+
createdAt: z.ZodString;
|
|
44
|
+
} & {
|
|
45
|
+
workflowCount: z.ZodNumber;
|
|
46
|
+
updatedAt: z.ZodString;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
role: "owner" | "admin" | "member";
|
|
49
|
+
name: string;
|
|
50
|
+
type: "personal" | "organization";
|
|
51
|
+
id: number;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
slug: string;
|
|
55
|
+
memberCount: number;
|
|
56
|
+
workflowCount: number;
|
|
57
|
+
}, {
|
|
58
|
+
role: "owner" | "admin" | "member";
|
|
59
|
+
name: string;
|
|
60
|
+
type: "personal" | "organization";
|
|
61
|
+
id: number;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
slug: string;
|
|
65
|
+
memberCount: number;
|
|
66
|
+
workflowCount: number;
|
|
67
|
+
}>;
|
|
68
|
+
export type OrganizationDetail = z.infer<typeof organizationDetailSchema>;
|
|
69
|
+
export declare const organizationMemberSchema: z.ZodObject<{
|
|
70
|
+
userId: z.ZodString;
|
|
71
|
+
email: z.ZodString;
|
|
72
|
+
name: z.ZodNullable<z.ZodString>;
|
|
73
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
74
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
75
|
+
joinedAt: z.ZodString;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
role: "owner" | "admin" | "member";
|
|
78
|
+
name: string | null;
|
|
79
|
+
userId: string;
|
|
80
|
+
email: string;
|
|
81
|
+
joinedAt: string;
|
|
82
|
+
avatarUrl?: string | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
role: "owner" | "admin" | "member";
|
|
85
|
+
name: string | null;
|
|
86
|
+
userId: string;
|
|
87
|
+
email: string;
|
|
88
|
+
joinedAt: string;
|
|
89
|
+
avatarUrl?: string | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export type OrganizationMember = z.infer<typeof organizationMemberSchema>;
|
|
92
|
+
export declare const createOrganizationSchema: z.ZodObject<{
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
slug: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
name: string;
|
|
97
|
+
slug: string;
|
|
98
|
+
}, {
|
|
99
|
+
name: string;
|
|
100
|
+
slug: string;
|
|
101
|
+
}>;
|
|
102
|
+
export type CreateOrganizationRequest = z.infer<typeof createOrganizationSchema>;
|
|
103
|
+
export declare const updateOrganizationSchema: z.ZodObject<{
|
|
104
|
+
name: z.ZodOptional<z.ZodString>;
|
|
105
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
name?: string | undefined;
|
|
108
|
+
slug?: string | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
name?: string | undefined;
|
|
111
|
+
slug?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
export type UpdateOrganizationRequest = z.infer<typeof updateOrganizationSchema>;
|
|
114
|
+
export declare const addMemberSchema: z.ZodObject<{
|
|
115
|
+
email: z.ZodString;
|
|
116
|
+
role: z.ZodEnum<["admin", "member"]>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
role: "admin" | "member";
|
|
119
|
+
email: string;
|
|
120
|
+
}, {
|
|
121
|
+
role: "admin" | "member";
|
|
122
|
+
email: string;
|
|
123
|
+
}>;
|
|
124
|
+
export type AddMemberRequest = z.infer<typeof addMemberSchema>;
|
|
125
|
+
export declare const updateMemberRoleSchema: z.ZodObject<{
|
|
126
|
+
role: z.ZodEnum<["admin", "member"]>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
role: "admin" | "member";
|
|
129
|
+
}, {
|
|
130
|
+
role: "admin" | "member";
|
|
131
|
+
}>;
|
|
132
|
+
export type UpdateMemberRoleRequest = z.infer<typeof updateMemberRoleSchema>;
|
|
133
|
+
export declare const listOrganizationsResponseSchema: z.ZodObject<{
|
|
134
|
+
organizations: z.ZodArray<z.ZodObject<{
|
|
135
|
+
id: z.ZodNumber;
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
slug: z.ZodString;
|
|
138
|
+
type: z.ZodEnum<["personal", "organization"]>;
|
|
139
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
140
|
+
memberCount: z.ZodNumber;
|
|
141
|
+
createdAt: z.ZodString;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
role: "owner" | "admin" | "member";
|
|
144
|
+
name: string;
|
|
145
|
+
type: "personal" | "organization";
|
|
146
|
+
id: number;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
slug: string;
|
|
149
|
+
memberCount: number;
|
|
150
|
+
}, {
|
|
151
|
+
role: "owner" | "admin" | "member";
|
|
152
|
+
name: string;
|
|
153
|
+
type: "personal" | "organization";
|
|
154
|
+
id: number;
|
|
155
|
+
createdAt: string;
|
|
156
|
+
slug: string;
|
|
157
|
+
memberCount: number;
|
|
158
|
+
}>, "many">;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
organizations: {
|
|
161
|
+
role: "owner" | "admin" | "member";
|
|
162
|
+
name: string;
|
|
163
|
+
type: "personal" | "organization";
|
|
164
|
+
id: number;
|
|
165
|
+
createdAt: string;
|
|
166
|
+
slug: string;
|
|
167
|
+
memberCount: number;
|
|
168
|
+
}[];
|
|
169
|
+
}, {
|
|
170
|
+
organizations: {
|
|
171
|
+
role: "owner" | "admin" | "member";
|
|
172
|
+
name: string;
|
|
173
|
+
type: "personal" | "organization";
|
|
174
|
+
id: number;
|
|
175
|
+
createdAt: string;
|
|
176
|
+
slug: string;
|
|
177
|
+
memberCount: number;
|
|
178
|
+
}[];
|
|
179
|
+
}>;
|
|
180
|
+
export type ListOrganizationsResponse = z.infer<typeof listOrganizationsResponseSchema>;
|
|
181
|
+
export declare const updateOrganizationResponseSchema: z.ZodObject<{
|
|
182
|
+
id: z.ZodNumber;
|
|
183
|
+
name: z.ZodString;
|
|
184
|
+
slug: z.ZodString;
|
|
185
|
+
updatedAt: z.ZodString;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
name: string;
|
|
188
|
+
id: number;
|
|
189
|
+
updatedAt: string;
|
|
190
|
+
slug: string;
|
|
191
|
+
}, {
|
|
192
|
+
name: string;
|
|
193
|
+
id: number;
|
|
194
|
+
updatedAt: string;
|
|
195
|
+
slug: string;
|
|
196
|
+
}>;
|
|
197
|
+
export type UpdateOrganizationResponse = z.infer<typeof updateOrganizationResponseSchema>;
|
|
198
|
+
export declare const listMembersResponseSchema: z.ZodObject<{
|
|
199
|
+
members: z.ZodArray<z.ZodObject<{
|
|
200
|
+
userId: z.ZodString;
|
|
201
|
+
email: z.ZodString;
|
|
202
|
+
name: z.ZodNullable<z.ZodString>;
|
|
203
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
204
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
205
|
+
joinedAt: z.ZodString;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
role: "owner" | "admin" | "member";
|
|
208
|
+
name: string | null;
|
|
209
|
+
userId: string;
|
|
210
|
+
email: string;
|
|
211
|
+
joinedAt: string;
|
|
212
|
+
avatarUrl?: string | undefined;
|
|
213
|
+
}, {
|
|
214
|
+
role: "owner" | "admin" | "member";
|
|
215
|
+
name: string | null;
|
|
216
|
+
userId: string;
|
|
217
|
+
email: string;
|
|
218
|
+
joinedAt: string;
|
|
219
|
+
avatarUrl?: string | undefined;
|
|
220
|
+
}>, "many">;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
members: {
|
|
223
|
+
role: "owner" | "admin" | "member";
|
|
224
|
+
name: string | null;
|
|
225
|
+
userId: string;
|
|
226
|
+
email: string;
|
|
227
|
+
joinedAt: string;
|
|
228
|
+
avatarUrl?: string | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
}, {
|
|
231
|
+
members: {
|
|
232
|
+
role: "owner" | "admin" | "member";
|
|
233
|
+
name: string | null;
|
|
234
|
+
userId: string;
|
|
235
|
+
email: string;
|
|
236
|
+
joinedAt: string;
|
|
237
|
+
avatarUrl?: string | undefined;
|
|
238
|
+
}[];
|
|
239
|
+
}>;
|
|
240
|
+
export type ListMembersResponse = z.infer<typeof listMembersResponseSchema>;
|
|
241
|
+
export declare const addMemberResponseSchema: z.ZodObject<{
|
|
242
|
+
userId: z.ZodString;
|
|
243
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
244
|
+
joinedAt: z.ZodString;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
role: "owner" | "admin" | "member";
|
|
247
|
+
userId: string;
|
|
248
|
+
joinedAt: string;
|
|
249
|
+
}, {
|
|
250
|
+
role: "owner" | "admin" | "member";
|
|
251
|
+
userId: string;
|
|
252
|
+
joinedAt: string;
|
|
253
|
+
}>;
|
|
254
|
+
export type AddMemberResponse = z.infer<typeof addMemberResponseSchema>;
|
|
255
|
+
export declare const updateMemberRoleResponseSchema: z.ZodObject<{
|
|
256
|
+
userId: z.ZodString;
|
|
257
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
role: "owner" | "admin" | "member";
|
|
260
|
+
userId: string;
|
|
261
|
+
}, {
|
|
262
|
+
role: "owner" | "admin" | "member";
|
|
263
|
+
userId: string;
|
|
264
|
+
}>;
|
|
265
|
+
export type UpdateMemberRoleResponse = z.infer<typeof updateMemberRoleResponseSchema>;
|
|
266
|
+
export declare const successResponseSchema: z.ZodObject<{
|
|
267
|
+
success: z.ZodBoolean;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
success: boolean;
|
|
270
|
+
}, {
|
|
271
|
+
success: boolean;
|
|
272
|
+
}>;
|
|
273
|
+
export type SuccessResponse = z.infer<typeof successResponseSchema>;
|
|
274
|
+
//# sourceMappingURL=organization-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-schema.d.ts","sourceRoot":"","sources":["../src/organization-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAMtC,eAAO,MAAM,aAAa,yCAEL,CAAC;AAEtB,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa,yCAEL,CAAC;AAEtB,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAMpD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EA2BL,CAAC;AAE3B,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWL,CAAC;AAEjC,MAAM,MAAM,kBAAkB,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,MAAM,uBAAuB;;;;;;;;;;;;EAML,CAAC;AAEhC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,8BAA8B;;;;;;;;;EAKL,CAAC;AAEvC,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAIL,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for workflow permission and trash management
|
|
3
|
+
* These are shared between frontend and backend
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@hono/zod-openapi';
|
|
6
|
+
export declare const flowRoleSchema: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
7
|
+
export type FlowRole = z.infer<typeof flowRoleSchema>;
|
|
8
|
+
export declare const flowPermissionSchema: z.ZodObject<{
|
|
9
|
+
userId: z.ZodString;
|
|
10
|
+
email: z.ZodString;
|
|
11
|
+
name: z.ZodNullable<z.ZodString>;
|
|
12
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
13
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
14
|
+
grantedAt: z.ZodString;
|
|
15
|
+
grantedBy: z.ZodNullable<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
18
|
+
name: string | null;
|
|
19
|
+
userId: string;
|
|
20
|
+
email: string;
|
|
21
|
+
grantedAt: string;
|
|
22
|
+
grantedBy: string | null;
|
|
23
|
+
avatarUrl?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
26
|
+
name: string | null;
|
|
27
|
+
userId: string;
|
|
28
|
+
email: string;
|
|
29
|
+
grantedAt: string;
|
|
30
|
+
grantedBy: string | null;
|
|
31
|
+
avatarUrl?: string | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type FlowPermission = z.infer<typeof flowPermissionSchema>;
|
|
34
|
+
export declare const trashedFlowSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodNumber;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
organizationId: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
organizationName: z.ZodNullable<z.ZodString>;
|
|
39
|
+
deletedAt: z.ZodString;
|
|
40
|
+
deletedBy: z.ZodNullable<z.ZodString>;
|
|
41
|
+
canRestore: z.ZodBoolean;
|
|
42
|
+
canPermanentDelete: z.ZodBoolean;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
name: string;
|
|
45
|
+
id: number;
|
|
46
|
+
organizationId: number | null;
|
|
47
|
+
organizationName: string | null;
|
|
48
|
+
deletedAt: string;
|
|
49
|
+
deletedBy: string | null;
|
|
50
|
+
canRestore: boolean;
|
|
51
|
+
canPermanentDelete: boolean;
|
|
52
|
+
}, {
|
|
53
|
+
name: string;
|
|
54
|
+
id: number;
|
|
55
|
+
organizationId: number | null;
|
|
56
|
+
organizationName: string | null;
|
|
57
|
+
deletedAt: string;
|
|
58
|
+
deletedBy: string | null;
|
|
59
|
+
canRestore: boolean;
|
|
60
|
+
canPermanentDelete: boolean;
|
|
61
|
+
}>;
|
|
62
|
+
export type TrashedFlow = z.infer<typeof trashedFlowSchema>;
|
|
63
|
+
export declare const grantPermissionSchema: z.ZodEffects<z.ZodObject<{
|
|
64
|
+
email: z.ZodOptional<z.ZodString>;
|
|
65
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
69
|
+
userId?: string | undefined;
|
|
70
|
+
email?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
73
|
+
userId?: string | undefined;
|
|
74
|
+
email?: string | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
77
|
+
userId?: string | undefined;
|
|
78
|
+
email?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
81
|
+
userId?: string | undefined;
|
|
82
|
+
email?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export type GrantPermissionRequest = z.infer<typeof grantPermissionSchema>;
|
|
85
|
+
export declare const updatePermissionSchema: z.ZodObject<{
|
|
86
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
89
|
+
}, {
|
|
90
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
91
|
+
}>;
|
|
92
|
+
export type UpdatePermissionRequest = z.infer<typeof updatePermissionSchema>;
|
|
93
|
+
export declare const transferOwnershipSchema: z.ZodObject<{
|
|
94
|
+
fromUserId: z.ZodString;
|
|
95
|
+
toUserId: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
fromUserId: string;
|
|
98
|
+
toUserId: string;
|
|
99
|
+
}, {
|
|
100
|
+
fromUserId: string;
|
|
101
|
+
toUserId: string;
|
|
102
|
+
}>;
|
|
103
|
+
export type TransferOwnershipRequest = z.infer<typeof transferOwnershipSchema>;
|
|
104
|
+
export declare const listFlowPermissionsResponseSchema: z.ZodObject<{
|
|
105
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
106
|
+
userId: z.ZodString;
|
|
107
|
+
email: z.ZodString;
|
|
108
|
+
name: z.ZodNullable<z.ZodString>;
|
|
109
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
110
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
111
|
+
grantedAt: z.ZodString;
|
|
112
|
+
grantedBy: z.ZodNullable<z.ZodString>;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
115
|
+
name: string | null;
|
|
116
|
+
userId: string;
|
|
117
|
+
email: string;
|
|
118
|
+
grantedAt: string;
|
|
119
|
+
grantedBy: string | null;
|
|
120
|
+
avatarUrl?: string | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
123
|
+
name: string | null;
|
|
124
|
+
userId: string;
|
|
125
|
+
email: string;
|
|
126
|
+
grantedAt: string;
|
|
127
|
+
grantedBy: string | null;
|
|
128
|
+
avatarUrl?: string | undefined;
|
|
129
|
+
}>, "many">;
|
|
130
|
+
organizationId: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
isInTrash: z.ZodBoolean;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
organizationId: number | null;
|
|
134
|
+
permissions: {
|
|
135
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
136
|
+
name: string | null;
|
|
137
|
+
userId: string;
|
|
138
|
+
email: string;
|
|
139
|
+
grantedAt: string;
|
|
140
|
+
grantedBy: string | null;
|
|
141
|
+
avatarUrl?: string | undefined;
|
|
142
|
+
}[];
|
|
143
|
+
isInTrash: boolean;
|
|
144
|
+
}, {
|
|
145
|
+
organizationId: number | null;
|
|
146
|
+
permissions: {
|
|
147
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
148
|
+
name: string | null;
|
|
149
|
+
userId: string;
|
|
150
|
+
email: string;
|
|
151
|
+
grantedAt: string;
|
|
152
|
+
grantedBy: string | null;
|
|
153
|
+
avatarUrl?: string | undefined;
|
|
154
|
+
}[];
|
|
155
|
+
isInTrash: boolean;
|
|
156
|
+
}>;
|
|
157
|
+
export type ListFlowPermissionsResponse = z.infer<typeof listFlowPermissionsResponseSchema>;
|
|
158
|
+
export declare const grantPermissionResponseSchema: z.ZodObject<{
|
|
159
|
+
userId: z.ZodString;
|
|
160
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
161
|
+
grantedAt: z.ZodString;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
164
|
+
userId: string;
|
|
165
|
+
grantedAt: string;
|
|
166
|
+
}, {
|
|
167
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
168
|
+
userId: string;
|
|
169
|
+
grantedAt: string;
|
|
170
|
+
}>;
|
|
171
|
+
export type GrantPermissionResponse = z.infer<typeof grantPermissionResponseSchema>;
|
|
172
|
+
export declare const updatePermissionResponseSchema: z.ZodObject<{
|
|
173
|
+
userId: z.ZodString;
|
|
174
|
+
role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>;
|
|
175
|
+
updatedAt: z.ZodString;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
178
|
+
userId: string;
|
|
179
|
+
updatedAt: string;
|
|
180
|
+
}, {
|
|
181
|
+
role: "owner" | "editor" | "runner" | "viewer";
|
|
182
|
+
userId: string;
|
|
183
|
+
updatedAt: string;
|
|
184
|
+
}>;
|
|
185
|
+
export type UpdatePermissionResponse = z.infer<typeof updatePermissionResponseSchema>;
|
|
186
|
+
export declare const transferOwnershipResponseSchema: z.ZodObject<{
|
|
187
|
+
previousOwner: z.ZodString;
|
|
188
|
+
newOwner: z.ZodString;
|
|
189
|
+
transferredAt: z.ZodString;
|
|
190
|
+
}, "strip", z.ZodTypeAny, {
|
|
191
|
+
previousOwner: string;
|
|
192
|
+
newOwner: string;
|
|
193
|
+
transferredAt: string;
|
|
194
|
+
}, {
|
|
195
|
+
previousOwner: string;
|
|
196
|
+
newOwner: string;
|
|
197
|
+
transferredAt: string;
|
|
198
|
+
}>;
|
|
199
|
+
export type TransferOwnershipResponse = z.infer<typeof transferOwnershipResponseSchema>;
|
|
200
|
+
export declare const listTrashResponseSchema: z.ZodObject<{
|
|
201
|
+
workflows: z.ZodArray<z.ZodObject<{
|
|
202
|
+
id: z.ZodNumber;
|
|
203
|
+
name: z.ZodString;
|
|
204
|
+
organizationId: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
organizationName: z.ZodNullable<z.ZodString>;
|
|
206
|
+
deletedAt: z.ZodString;
|
|
207
|
+
deletedBy: z.ZodNullable<z.ZodString>;
|
|
208
|
+
canRestore: z.ZodBoolean;
|
|
209
|
+
canPermanentDelete: z.ZodBoolean;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
name: string;
|
|
212
|
+
id: number;
|
|
213
|
+
organizationId: number | null;
|
|
214
|
+
organizationName: string | null;
|
|
215
|
+
deletedAt: string;
|
|
216
|
+
deletedBy: string | null;
|
|
217
|
+
canRestore: boolean;
|
|
218
|
+
canPermanentDelete: boolean;
|
|
219
|
+
}, {
|
|
220
|
+
name: string;
|
|
221
|
+
id: number;
|
|
222
|
+
organizationId: number | null;
|
|
223
|
+
organizationName: string | null;
|
|
224
|
+
deletedAt: string;
|
|
225
|
+
deletedBy: string | null;
|
|
226
|
+
canRestore: boolean;
|
|
227
|
+
canPermanentDelete: boolean;
|
|
228
|
+
}>, "many">;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
workflows: {
|
|
231
|
+
name: string;
|
|
232
|
+
id: number;
|
|
233
|
+
organizationId: number | null;
|
|
234
|
+
organizationName: string | null;
|
|
235
|
+
deletedAt: string;
|
|
236
|
+
deletedBy: string | null;
|
|
237
|
+
canRestore: boolean;
|
|
238
|
+
canPermanentDelete: boolean;
|
|
239
|
+
}[];
|
|
240
|
+
}, {
|
|
241
|
+
workflows: {
|
|
242
|
+
name: string;
|
|
243
|
+
id: number;
|
|
244
|
+
organizationId: number | null;
|
|
245
|
+
organizationName: string | null;
|
|
246
|
+
deletedAt: string;
|
|
247
|
+
deletedBy: string | null;
|
|
248
|
+
canRestore: boolean;
|
|
249
|
+
canPermanentDelete: boolean;
|
|
250
|
+
}[];
|
|
251
|
+
}>;
|
|
252
|
+
export type ListTrashResponse = z.infer<typeof listTrashResponseSchema>;
|
|
253
|
+
export declare const restoreFlowResponseSchema: z.ZodObject<{
|
|
254
|
+
id: z.ZodNumber;
|
|
255
|
+
restoredAt: z.ZodString;
|
|
256
|
+
message: z.ZodString;
|
|
257
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
|
+
message: string;
|
|
259
|
+
id: number;
|
|
260
|
+
restoredAt: string;
|
|
261
|
+
}, {
|
|
262
|
+
message: string;
|
|
263
|
+
id: number;
|
|
264
|
+
restoredAt: string;
|
|
265
|
+
}>;
|
|
266
|
+
export type RestoreFlowResponse = z.infer<typeof restoreFlowResponseSchema>;
|
|
267
|
+
//# sourceMappingURL=permission-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-schema.d.ts","sourceRoot":"","sources":["../src/permission-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAMtC,eAAO,MAAM,cAAc,oDAEL,CAAC;AAEvB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAMtD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EA4BL,CAAC;AAE7B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCL,CAAC;AAE1B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,qBAA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BAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -192,9 +192,9 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
|
|
|
192
192
|
totalTokens: number;
|
|
193
193
|
}[];
|
|
194
194
|
};
|
|
195
|
+
userId: string;
|
|
195
196
|
isActive: boolean;
|
|
196
197
|
plan: string;
|
|
197
|
-
userId: string;
|
|
198
198
|
planDisplayName: string;
|
|
199
199
|
features: string[];
|
|
200
200
|
hackathonOffer?: {
|
|
@@ -230,9 +230,9 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
|
|
|
230
230
|
totalTokens: number;
|
|
231
231
|
}[];
|
|
232
232
|
};
|
|
233
|
+
userId: string;
|
|
233
234
|
isActive: boolean;
|
|
234
235
|
plan: string;
|
|
235
|
-
userId: string;
|
|
236
236
|
planDisplayName: string;
|
|
237
237
|
features: string[];
|
|
238
238
|
hackathonOffer?: {
|