@zaflun/lumio-extension-types 0.1.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 zaflun
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @zaflun/lumio-extension-types
2
+
3
+ Shared TypeScript types for the [Lumio](https://lumio.vision) Extension Platform. Used by `@zaflun/lumio-sdk` and `@zaflun/lumio-cli` for type-safe extension development.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @zaflun/lumio-extension-types
9
+ ```
10
+
11
+ ## What's included
12
+
13
+ ### Extension Types
14
+
15
+ ```typescript
16
+ import type { Extension, ExtensionVersion, ExtensionInstall } from "@zaflun/lumio-extension-types";
17
+ import { extensionSchema, extensionCategorySchema } from "@zaflun/lumio-extension-types";
18
+ ```
19
+
20
+ - `Extension` — Store listing (name, slug, category, pricing, ratings)
21
+ - `ExtensionVersion` — Version metadata (status, manifest, bundle hash)
22
+ - `ExtensionInstall` — Per-account installation (config, auto-update)
23
+ - `ExtensionReview` — User review (rating 1-5, comment)
24
+
25
+ ### Config Types
26
+
27
+ ```typescript
28
+ import type { LumioExtensionConfig } from "@zaflun/lumio-extension-types";
29
+ import { lumioExtensionConfigSchema } from "@zaflun/lumio-extension-types";
30
+
31
+ // Validate a lumio.config.json file
32
+ const result = lumioExtensionConfigSchema.safeParse(configData);
33
+ ```
34
+
35
+ ### Developer Types
36
+
37
+ ```typescript
38
+ import type { DeveloperProfile, DeveloperTeam } from "@zaflun/lumio-extension-types";
39
+ ```
40
+
41
+ ### Enums
42
+
43
+ ```typescript
44
+ import {
45
+ EXTENSION_CATEGORIES, // widget, extension, overlay, bot_module, integration, theme
46
+ EXTENSION_VISIBILITIES, // private, unlisted, public, paid
47
+ EXTENSION_STATUSES, // draft, published, deprecated, ...
48
+ VERSION_STATUSES, // draft, pending_review, testing, published, ...
49
+ DEVELOPER_TYPES, // individual, company
50
+ DEVELOPER_TEAM_ROLES, // owner, admin, member
51
+ } from "@zaflun/lumio-extension-types";
52
+ ```
53
+
54
+ All types include Zod schemas for runtime validation.
55
+
56
+ ## Documentation
57
+
58
+ - [Type Reference](https://developers.lumio.vision/api-reference/types)
59
+ - [Full Docs](https://developers.lumio.vision)
60
+
61
+ ## License
62
+
63
+ MIT © [zaflun](https://withzaflun.com)
@@ -0,0 +1,302 @@
1
+ import { z } from 'zod/v4';
2
+
3
+ declare const EXTENSION_CATEGORIES: readonly ["widget", "extension", "overlay", "bot_module", "integration", "theme"];
4
+ declare const EXTENSION_VISIBILITIES: readonly ["private", "unlisted", "public", "paid"];
5
+ declare const EXTENSION_STATUSES: readonly ["draft", "published", "deprecated", "pending_deletion", "deleted", "suspended"];
6
+ declare const VERSION_STATUSES: readonly ["draft", "pending_review", "testing", "pending_publish", "published", "rejected", "deprecated", "suspended"];
7
+ declare const extensionCategorySchema: z.ZodEnum<{
8
+ widget: "widget";
9
+ extension: "extension";
10
+ overlay: "overlay";
11
+ bot_module: "bot_module";
12
+ integration: "integration";
13
+ theme: "theme";
14
+ }>;
15
+ declare const extensionVisibilitySchema: z.ZodEnum<{
16
+ private: "private";
17
+ unlisted: "unlisted";
18
+ public: "public";
19
+ paid: "paid";
20
+ }>;
21
+ declare const extensionStatusSchema: z.ZodEnum<{
22
+ draft: "draft";
23
+ published: "published";
24
+ deprecated: "deprecated";
25
+ pending_deletion: "pending_deletion";
26
+ deleted: "deleted";
27
+ suspended: "suspended";
28
+ }>;
29
+ declare const versionStatusSchema: z.ZodEnum<{
30
+ draft: "draft";
31
+ published: "published";
32
+ deprecated: "deprecated";
33
+ suspended: "suspended";
34
+ pending_review: "pending_review";
35
+ testing: "testing";
36
+ pending_publish: "pending_publish";
37
+ rejected: "rejected";
38
+ }>;
39
+ type ExtensionCategory = z.infer<typeof extensionCategorySchema>;
40
+ type ExtensionVisibility = z.infer<typeof extensionVisibilitySchema>;
41
+ type ExtensionStatus = z.infer<typeof extensionStatusSchema>;
42
+ type VersionStatus = z.infer<typeof versionStatusSchema>;
43
+ declare const extensionSchema: z.ZodObject<{
44
+ id: z.ZodString;
45
+ short_id: z.ZodString;
46
+ developer_id: z.ZodNullable<z.ZodString>;
47
+ team_id: z.ZodNullable<z.ZodString>;
48
+ slug: z.ZodString;
49
+ name: z.ZodString;
50
+ description: z.ZodNullable<z.ZodString>;
51
+ category: z.ZodEnum<{
52
+ widget: "widget";
53
+ extension: "extension";
54
+ overlay: "overlay";
55
+ bot_module: "bot_module";
56
+ integration: "integration";
57
+ theme: "theme";
58
+ }>;
59
+ visibility: z.ZodEnum<{
60
+ private: "private";
61
+ unlisted: "unlisted";
62
+ public: "public";
63
+ paid: "paid";
64
+ }>;
65
+ icon_key: z.ZodNullable<z.ZodString>;
66
+ pricing_type: z.ZodEnum<{
67
+ free: "free";
68
+ one_time: "one_time";
69
+ subscription: "subscription";
70
+ }>;
71
+ pricing_amount: z.ZodNullable<z.ZodNumber>;
72
+ pricing_currency: z.ZodString;
73
+ pricing_interval: z.ZodNullable<z.ZodString>;
74
+ install_count: z.ZodNumber;
75
+ rating_avg: z.ZodNumber;
76
+ rating_count: z.ZodNumber;
77
+ status: z.ZodEnum<{
78
+ draft: "draft";
79
+ published: "published";
80
+ deprecated: "deprecated";
81
+ pending_deletion: "pending_deletion";
82
+ deleted: "deleted";
83
+ suspended: "suspended";
84
+ }>;
85
+ published_at: z.ZodNullable<z.ZodString>;
86
+ created_at: z.ZodString;
87
+ updated_at: z.ZodString;
88
+ }, z.core.$strip>;
89
+ type Extension = z.infer<typeof extensionSchema>;
90
+ declare const extensionVersionSchema: z.ZodObject<{
91
+ id: z.ZodString;
92
+ extension_id: z.ZodString;
93
+ version: z.ZodString;
94
+ status: z.ZodEnum<{
95
+ draft: "draft";
96
+ published: "published";
97
+ deprecated: "deprecated";
98
+ suspended: "suspended";
99
+ pending_review: "pending_review";
100
+ testing: "testing";
101
+ pending_publish: "pending_publish";
102
+ rejected: "rejected";
103
+ }>;
104
+ bundle_key: z.ZodNullable<z.ZodString>;
105
+ source_key: z.ZodNullable<z.ZodString>;
106
+ bundle_hash: z.ZodNullable<z.ZodString>;
107
+ manifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
108
+ is_breaking: z.ZodBoolean;
109
+ release_notes: z.ZodNullable<z.ZodString>;
110
+ changelog_entry: z.ZodNullable<z.ZodString>;
111
+ review_notes: z.ZodNullable<z.ZodString>;
112
+ reviewed_by: z.ZodNullable<z.ZodString>;
113
+ reviewed_at: z.ZodNullable<z.ZodString>;
114
+ published_at: z.ZodNullable<z.ZodString>;
115
+ created_at: z.ZodString;
116
+ }, z.core.$strip>;
117
+ type ExtensionVersion = z.infer<typeof extensionVersionSchema>;
118
+ declare const extensionInstallSchema: z.ZodObject<{
119
+ id: z.ZodString;
120
+ extension_id: z.ZodString;
121
+ account_id: z.ZodString;
122
+ version_id: z.ZodString;
123
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
124
+ auto_update: z.ZodBoolean;
125
+ pinned_version_id: z.ZodNullable<z.ZodString>;
126
+ data_deletion_at: z.ZodNullable<z.ZodString>;
127
+ installed_at: z.ZodString;
128
+ updated_at: z.ZodString;
129
+ }, z.core.$strip>;
130
+ type ExtensionInstall = z.infer<typeof extensionInstallSchema>;
131
+ declare const extensionReviewSchema: z.ZodObject<{
132
+ id: z.ZodString;
133
+ extension_id: z.ZodString;
134
+ user_id: z.ZodString;
135
+ rating: z.ZodNumber;
136
+ comment: z.ZodNullable<z.ZodString>;
137
+ created_at: z.ZodString;
138
+ updated_at: z.ZodString;
139
+ }, z.core.$strip>;
140
+ type ExtensionReview = z.infer<typeof extensionReviewSchema>;
141
+
142
+ declare const PRICING_TYPES: readonly ["free", "one_time", "subscription"];
143
+ declare const CONFIG_FIELD_TYPES: readonly ["string", "number", "boolean", "color", "select"];
144
+ declare const pricingTypeSchema: z.ZodEnum<{
145
+ free: "free";
146
+ one_time: "one_time";
147
+ subscription: "subscription";
148
+ }>;
149
+ type PricingType = z.infer<typeof pricingTypeSchema>;
150
+ declare const extensionPricingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ type: z.ZodLiteral<"free">;
152
+ }, z.core.$strip>, z.ZodObject<{
153
+ type: z.ZodLiteral<"one_time">;
154
+ amount: z.ZodNumber;
155
+ currency: z.ZodString;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ type: z.ZodLiteral<"subscription">;
158
+ amount: z.ZodNumber;
159
+ currency: z.ZodString;
160
+ interval: z.ZodString;
161
+ }, z.core.$strip>], "type">;
162
+ type ExtensionPricing = z.infer<typeof extensionPricingSchema>;
163
+ declare const configFieldSchema: z.ZodObject<{
164
+ key: z.ZodString;
165
+ type: z.ZodEnum<{
166
+ string: "string";
167
+ number: "number";
168
+ boolean: "boolean";
169
+ color: "color";
170
+ select: "select";
171
+ }>;
172
+ label: z.ZodString;
173
+ default_value: z.ZodUnknown;
174
+ required: z.ZodBoolean;
175
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
+ }, z.core.$strip>;
177
+ type ConfigField = z.infer<typeof configFieldSchema>;
178
+ declare const configSchemaSchema: z.ZodArray<z.ZodObject<{
179
+ key: z.ZodString;
180
+ type: z.ZodEnum<{
181
+ string: "string";
182
+ number: "number";
183
+ boolean: "boolean";
184
+ color: "color";
185
+ select: "select";
186
+ }>;
187
+ label: z.ZodString;
188
+ default_value: z.ZodUnknown;
189
+ required: z.ZodBoolean;
190
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
191
+ }, z.core.$strip>>;
192
+ type ConfigSchema = z.infer<typeof configSchemaSchema>;
193
+ declare const lumioExtensionConfigSchema: z.ZodObject<{
194
+ extension_id: z.ZodString;
195
+ name: z.ZodString;
196
+ description: z.ZodOptional<z.ZodString>;
197
+ category: z.ZodEnum<{
198
+ widget: "widget";
199
+ extension: "extension";
200
+ overlay: "overlay";
201
+ bot_module: "bot_module";
202
+ integration: "integration";
203
+ theme: "theme";
204
+ }>;
205
+ version: z.ZodString;
206
+ targets: z.ZodArray<z.ZodEnum<{
207
+ editor: "editor";
208
+ layer: "layer";
209
+ interactive: "interactive";
210
+ }>>;
211
+ server: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
212
+ permissions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
213
+ egress: z.ZodOptional<z.ZodObject<{
214
+ allow_hosts: z.ZodArray<z.ZodString>;
215
+ allow_ports: z.ZodArray<z.ZodNumber>;
216
+ }, z.core.$strip>>;
217
+ fonts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
218
+ visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
219
+ private: "private";
220
+ unlisted: "unlisted";
221
+ public: "public";
222
+ paid: "paid";
223
+ }>>>;
224
+ pricing: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
225
+ type: z.ZodLiteral<"free">;
226
+ }, z.core.$strip>, z.ZodObject<{
227
+ type: z.ZodLiteral<"one_time">;
228
+ amount: z.ZodNumber;
229
+ currency: z.ZodString;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ type: z.ZodLiteral<"subscription">;
232
+ amount: z.ZodNumber;
233
+ currency: z.ZodString;
234
+ interval: z.ZodString;
235
+ }, z.core.$strip>], "type">>>;
236
+ config_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
237
+ key: z.ZodString;
238
+ type: z.ZodEnum<{
239
+ string: "string";
240
+ number: "number";
241
+ boolean: "boolean";
242
+ color: "color";
243
+ select: "select";
244
+ }>;
245
+ label: z.ZodString;
246
+ default_value: z.ZodUnknown;
247
+ required: z.ZodBoolean;
248
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
249
+ }, z.core.$strip>>>;
250
+ }, z.core.$strip>;
251
+ type LumioExtensionConfig = z.infer<typeof lumioExtensionConfigSchema>;
252
+
253
+ declare const DEVELOPER_TYPES: readonly ["individual", "company"];
254
+ declare const developerTypeSchema: z.ZodEnum<{
255
+ individual: "individual";
256
+ company: "company";
257
+ }>;
258
+ type DeveloperType = z.infer<typeof developerTypeSchema>;
259
+ declare const DEVELOPER_VERIFICATION_STATUSES: readonly ["pending", "verified", "rejected"];
260
+ declare const developerVerificationStatusSchema: z.ZodEnum<{
261
+ rejected: "rejected";
262
+ pending: "pending";
263
+ verified: "verified";
264
+ }>;
265
+ type DeveloperVerificationStatus = z.infer<typeof developerVerificationStatusSchema>;
266
+ declare const developerProfileSchema: z.ZodObject<{
267
+ id: z.ZodString;
268
+ user_id: z.ZodString;
269
+ stripe_connect_id: z.ZodNullable<z.ZodString>;
270
+ paypal_email: z.ZodNullable<z.ZodString>;
271
+ bank_iban: z.ZodNullable<z.ZodString>;
272
+ bank_bic: z.ZodNullable<z.ZodString>;
273
+ bank_name: z.ZodNullable<z.ZodString>;
274
+ payout_method: z.ZodNullable<z.ZodEnum<{
275
+ stripe: "stripe";
276
+ paypal: "paypal";
277
+ bank: "bank";
278
+ }>>;
279
+ revenue_balance: z.ZodNumber;
280
+ total_earned: z.ZodNumber;
281
+ created_at: z.ZodString;
282
+ updated_at: z.ZodString;
283
+ }, z.core.$strip>;
284
+ type DeveloperProfile = z.infer<typeof developerProfileSchema>;
285
+ declare const developerTeamSchema: z.ZodObject<{
286
+ id: z.ZodString;
287
+ name: z.ZodString;
288
+ slug: z.ZodString;
289
+ owner_id: z.ZodString;
290
+ created_at: z.ZodString;
291
+ updated_at: z.ZodString;
292
+ }, z.core.$strip>;
293
+ type DeveloperTeam = z.infer<typeof developerTeamSchema>;
294
+ declare const DEVELOPER_TEAM_ROLES: readonly ["owner", "admin", "member"];
295
+ declare const developerTeamRoleSchema: z.ZodEnum<{
296
+ owner: "owner";
297
+ admin: "admin";
298
+ member: "member";
299
+ }>;
300
+ type DeveloperTeamRole = z.infer<typeof developerTeamRoleSchema>;
301
+
302
+ export { CONFIG_FIELD_TYPES, type ConfigField, type ConfigSchema, DEVELOPER_TEAM_ROLES, DEVELOPER_TYPES, DEVELOPER_VERIFICATION_STATUSES, type DeveloperProfile, type DeveloperTeam, type DeveloperTeamRole, type DeveloperType, type DeveloperVerificationStatus, EXTENSION_CATEGORIES, EXTENSION_STATUSES, EXTENSION_VISIBILITIES, type Extension, type ExtensionCategory, type ExtensionInstall, type ExtensionPricing, type ExtensionReview, type ExtensionStatus, type ExtensionVersion, type ExtensionVisibility, type LumioExtensionConfig, PRICING_TYPES, type PricingType, VERSION_STATUSES, type VersionStatus, configFieldSchema, configSchemaSchema, developerProfileSchema, developerTeamRoleSchema, developerTeamSchema, developerTypeSchema, developerVerificationStatusSchema, extensionCategorySchema, extensionInstallSchema, extensionPricingSchema, extensionReviewSchema, extensionSchema, extensionStatusSchema, extensionVersionSchema, extensionVisibilitySchema, lumioExtensionConfigSchema, pricingTypeSchema, versionStatusSchema };
package/dist/index.js ADDED
@@ -0,0 +1,221 @@
1
+ // src/extension.ts
2
+ import { z } from "zod/v4";
3
+ var EXTENSION_CATEGORIES = [
4
+ "widget",
5
+ "extension",
6
+ "overlay",
7
+ "bot_module",
8
+ "integration",
9
+ "theme"
10
+ ];
11
+ var EXTENSION_VISIBILITIES = [
12
+ "private",
13
+ "unlisted",
14
+ "public",
15
+ "paid"
16
+ ];
17
+ var EXTENSION_STATUSES = [
18
+ "draft",
19
+ "published",
20
+ "deprecated",
21
+ "pending_deletion",
22
+ "deleted",
23
+ "suspended"
24
+ ];
25
+ var VERSION_STATUSES = [
26
+ "draft",
27
+ "pending_review",
28
+ "testing",
29
+ "pending_publish",
30
+ "published",
31
+ "rejected",
32
+ "deprecated",
33
+ "suspended"
34
+ ];
35
+ var extensionCategorySchema = z.enum(EXTENSION_CATEGORIES);
36
+ var extensionVisibilitySchema = z.enum(EXTENSION_VISIBILITIES);
37
+ var extensionStatusSchema = z.enum(EXTENSION_STATUSES);
38
+ var versionStatusSchema = z.enum(VERSION_STATUSES);
39
+ var extensionSchema = z.object({
40
+ id: z.string(),
41
+ short_id: z.string(),
42
+ developer_id: z.string().nullable(),
43
+ team_id: z.string().nullable(),
44
+ slug: z.string(),
45
+ name: z.string(),
46
+ description: z.string().nullable(),
47
+ category: extensionCategorySchema,
48
+ visibility: extensionVisibilitySchema,
49
+ icon_key: z.string().nullable(),
50
+ pricing_type: z.enum(["free", "one_time", "subscription"]),
51
+ pricing_amount: z.number().nullable(),
52
+ pricing_currency: z.string(),
53
+ pricing_interval: z.string().nullable(),
54
+ install_count: z.number(),
55
+ rating_avg: z.number(),
56
+ rating_count: z.number(),
57
+ status: extensionStatusSchema,
58
+ published_at: z.string().nullable(),
59
+ created_at: z.string(),
60
+ updated_at: z.string()
61
+ });
62
+ var extensionVersionSchema = z.object({
63
+ id: z.string(),
64
+ extension_id: z.string(),
65
+ version: z.string(),
66
+ status: versionStatusSchema,
67
+ bundle_key: z.string().nullable(),
68
+ source_key: z.string().nullable(),
69
+ bundle_hash: z.string().nullable(),
70
+ manifest: z.record(z.string(), z.unknown()),
71
+ is_breaking: z.boolean(),
72
+ release_notes: z.string().nullable(),
73
+ changelog_entry: z.string().nullable(),
74
+ review_notes: z.string().nullable(),
75
+ reviewed_by: z.string().nullable(),
76
+ reviewed_at: z.string().nullable(),
77
+ published_at: z.string().nullable(),
78
+ created_at: z.string()
79
+ });
80
+ var extensionInstallSchema = z.object({
81
+ id: z.string(),
82
+ extension_id: z.string(),
83
+ account_id: z.string(),
84
+ version_id: z.string(),
85
+ config: z.record(z.string(), z.unknown()),
86
+ auto_update: z.boolean(),
87
+ pinned_version_id: z.string().nullable(),
88
+ data_deletion_at: z.string().nullable(),
89
+ installed_at: z.string(),
90
+ updated_at: z.string()
91
+ });
92
+ var extensionReviewSchema = z.object({
93
+ id: z.string(),
94
+ extension_id: z.string(),
95
+ user_id: z.string(),
96
+ rating: z.number().int().min(1).max(5),
97
+ comment: z.string().nullable(),
98
+ created_at: z.string(),
99
+ updated_at: z.string()
100
+ });
101
+
102
+ // src/config.ts
103
+ import { z as z2 } from "zod/v4";
104
+ var PRICING_TYPES = ["free", "one_time", "subscription"];
105
+ var CONFIG_FIELD_TYPES = [
106
+ "string",
107
+ "number",
108
+ "boolean",
109
+ "color",
110
+ "select"
111
+ ];
112
+ var pricingTypeSchema = z2.enum(PRICING_TYPES);
113
+ var extensionPricingSchema = z2.discriminatedUnion("type", [
114
+ z2.object({
115
+ type: z2.literal("free")
116
+ }),
117
+ z2.object({
118
+ type: z2.literal("one_time"),
119
+ amount: z2.number(),
120
+ currency: z2.string()
121
+ }),
122
+ z2.object({
123
+ type: z2.literal("subscription"),
124
+ amount: z2.number(),
125
+ currency: z2.string(),
126
+ interval: z2.string()
127
+ })
128
+ ]);
129
+ var configFieldSchema = z2.object({
130
+ key: z2.string(),
131
+ type: z2.enum(CONFIG_FIELD_TYPES),
132
+ label: z2.string(),
133
+ default_value: z2.unknown(),
134
+ required: z2.boolean(),
135
+ options: z2.array(z2.string()).optional()
136
+ });
137
+ var configSchemaSchema = z2.array(configFieldSchema);
138
+ var lumioExtensionConfigSchema = z2.object({
139
+ extension_id: z2.string(),
140
+ name: z2.string(),
141
+ description: z2.string().optional(),
142
+ category: extensionCategorySchema,
143
+ version: z2.string(),
144
+ targets: z2.array(z2.enum(["editor", "layer", "interactive"])).min(1),
145
+ server: z2.boolean().optional().default(false),
146
+ permissions: z2.array(z2.string()).optional().default([]),
147
+ egress: z2.object({
148
+ allow_hosts: z2.array(z2.string()),
149
+ allow_ports: z2.array(z2.number())
150
+ }).optional(),
151
+ fonts: z2.array(z2.string()).optional().default([]),
152
+ visibility: extensionVisibilitySchema.optional().default("private"),
153
+ pricing: extensionPricingSchema.optional().default({ type: "free" }),
154
+ config_schema: configSchemaSchema.optional()
155
+ });
156
+
157
+ // src/developer.ts
158
+ import { z as z3 } from "zod/v4";
159
+ var DEVELOPER_TYPES = ["individual", "company"];
160
+ var developerTypeSchema = z3.enum(DEVELOPER_TYPES);
161
+ var DEVELOPER_VERIFICATION_STATUSES = [
162
+ "pending",
163
+ "verified",
164
+ "rejected"
165
+ ];
166
+ var developerVerificationStatusSchema = z3.enum(
167
+ DEVELOPER_VERIFICATION_STATUSES
168
+ );
169
+ var developerProfileSchema = z3.object({
170
+ id: z3.string(),
171
+ user_id: z3.string(),
172
+ stripe_connect_id: z3.string().nullable(),
173
+ paypal_email: z3.string().nullable(),
174
+ bank_iban: z3.string().nullable(),
175
+ bank_bic: z3.string().nullable(),
176
+ bank_name: z3.string().nullable(),
177
+ payout_method: z3.enum(["stripe", "paypal", "bank"]).nullable(),
178
+ revenue_balance: z3.number(),
179
+ total_earned: z3.number(),
180
+ created_at: z3.string(),
181
+ updated_at: z3.string()
182
+ });
183
+ var developerTeamSchema = z3.object({
184
+ id: z3.string(),
185
+ name: z3.string(),
186
+ slug: z3.string(),
187
+ owner_id: z3.string(),
188
+ created_at: z3.string(),
189
+ updated_at: z3.string()
190
+ });
191
+ var DEVELOPER_TEAM_ROLES = ["owner", "admin", "member"];
192
+ var developerTeamRoleSchema = z3.enum(DEVELOPER_TEAM_ROLES);
193
+ export {
194
+ CONFIG_FIELD_TYPES,
195
+ DEVELOPER_TEAM_ROLES,
196
+ DEVELOPER_TYPES,
197
+ DEVELOPER_VERIFICATION_STATUSES,
198
+ EXTENSION_CATEGORIES,
199
+ EXTENSION_STATUSES,
200
+ EXTENSION_VISIBILITIES,
201
+ PRICING_TYPES,
202
+ VERSION_STATUSES,
203
+ configFieldSchema,
204
+ configSchemaSchema,
205
+ developerProfileSchema,
206
+ developerTeamRoleSchema,
207
+ developerTeamSchema,
208
+ developerTypeSchema,
209
+ developerVerificationStatusSchema,
210
+ extensionCategorySchema,
211
+ extensionInstallSchema,
212
+ extensionPricingSchema,
213
+ extensionReviewSchema,
214
+ extensionSchema,
215
+ extensionStatusSchema,
216
+ extensionVersionSchema,
217
+ extensionVisibilitySchema,
218
+ lumioExtensionConfigSchema,
219
+ pricingTypeSchema,
220
+ versionStatusSchema
221
+ };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@zaflun/lumio-extension-types",
3
+ "version": "0.1.0",
4
+ "description": "Shared TypeScript types for Lumio extensions, store, and config",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "zod": "^4.3.6"
19
+ },
20
+ "devDependencies": {
21
+ "typescript": "^6.0.2",
22
+ "tsup": "^8.4.0"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "author": {
28
+ "name": "zaflun",
29
+ "email": "developers@zaflun.com",
30
+ "url": "https://withzaflun.com"
31
+ },
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/zaflun/lumio.git",
36
+ "directory": "packages/extension-types"
37
+ },
38
+ "homepage": "https://developers.lumio.vision",
39
+ "bugs": {
40
+ "url": "https://github.com/zaflun/lumio/issues",
41
+ "email": "developers@zaflun.com"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup src/index.ts --format esm --dts --clean",
45
+ "typecheck": "tsc --noEmit",
46
+ "lint": "eslint src/",
47
+ "test": "vitest run"
48
+ }
49
+ }