@bubblelab/shared-schemas 0.1.47 → 0.1.49

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.
@@ -34,10 +34,10 @@ export declare const MilkTeaRequestSchema: z.ZodObject<{
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  bubbleName: string;
36
36
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b";
37
+ userName: string;
37
38
  userRequest: string;
38
39
  bubbleSchema: Record<string, unknown>;
39
40
  availableCredentials: string[];
40
- userName: string;
41
41
  conversationHistory: {
42
42
  role: "user" | "assistant" | "tool";
43
43
  content: string;
@@ -48,9 +48,9 @@ export declare const MilkTeaRequestSchema: z.ZodObject<{
48
48
  insertLocation?: string | undefined;
49
49
  }, {
50
50
  bubbleName: string;
51
+ userName: string;
51
52
  userRequest: string;
52
53
  bubbleSchema: Record<string, unknown>;
53
- userName: string;
54
54
  model?: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | undefined;
55
55
  currentCode?: string | undefined;
56
56
  availableCredentials?: string[] | undefined;
@@ -12,6 +12,7 @@ export declare const organizationSchema: z.ZodObject<{
12
12
  name: z.ZodString;
13
13
  slug: z.ZodString;
14
14
  type: z.ZodEnum<["personal", "organization"]>;
15
+ domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
16
  role: z.ZodEnum<["owner", "admin", "member"]>;
16
17
  memberCount: z.ZodNumber;
17
18
  createdAt: z.ZodString;
@@ -23,6 +24,7 @@ export declare const organizationSchema: z.ZodObject<{
23
24
  createdAt: string;
24
25
  slug: string;
25
26
  memberCount: number;
27
+ domain?: string | null | undefined;
26
28
  }, {
27
29
  role: "owner" | "admin" | "member";
28
30
  name: string;
@@ -31,6 +33,7 @@ export declare const organizationSchema: z.ZodObject<{
31
33
  createdAt: string;
32
34
  slug: string;
33
35
  memberCount: number;
36
+ domain?: string | null | undefined;
34
37
  }>;
35
38
  export type Organization = z.infer<typeof organizationSchema>;
36
39
  export declare const organizationDetailSchema: z.ZodObject<{
@@ -38,6 +41,7 @@ export declare const organizationDetailSchema: z.ZodObject<{
38
41
  name: z.ZodString;
39
42
  slug: z.ZodString;
40
43
  type: z.ZodEnum<["personal", "organization"]>;
44
+ domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
45
  role: z.ZodEnum<["owner", "admin", "member"]>;
42
46
  memberCount: z.ZodNumber;
43
47
  createdAt: z.ZodString;
@@ -54,6 +58,7 @@ export declare const organizationDetailSchema: z.ZodObject<{
54
58
  slug: string;
55
59
  memberCount: number;
56
60
  workflowCount: number;
61
+ domain?: string | null | undefined;
57
62
  }, {
58
63
  role: "owner" | "admin" | "member";
59
64
  name: string;
@@ -64,6 +69,7 @@ export declare const organizationDetailSchema: z.ZodObject<{
64
69
  slug: string;
65
70
  memberCount: number;
66
71
  workflowCount: number;
72
+ domain?: string | null | undefined;
67
73
  }>;
68
74
  export type OrganizationDetail = z.infer<typeof organizationDetailSchema>;
69
75
  export declare const organizationMemberSchema: z.ZodObject<{
@@ -92,22 +98,28 @@ export type OrganizationMember = z.infer<typeof organizationMemberSchema>;
92
98
  export declare const createOrganizationSchema: z.ZodObject<{
93
99
  name: z.ZodString;
94
100
  slug: z.ZodString;
101
+ domain: z.ZodOptional<z.ZodString>;
95
102
  }, "strip", z.ZodTypeAny, {
96
103
  name: string;
97
104
  slug: string;
105
+ domain?: string | undefined;
98
106
  }, {
99
107
  name: string;
100
108
  slug: string;
109
+ domain?: string | undefined;
101
110
  }>;
102
111
  export type CreateOrganizationRequest = z.infer<typeof createOrganizationSchema>;
103
112
  export declare const updateOrganizationSchema: z.ZodObject<{
104
113
  name: z.ZodOptional<z.ZodString>;
105
114
  slug: z.ZodOptional<z.ZodString>;
115
+ domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
116
  }, "strip", z.ZodTypeAny, {
107
117
  name?: string | undefined;
118
+ domain?: string | null | undefined;
108
119
  slug?: string | undefined;
109
120
  }, {
110
121
  name?: string | undefined;
122
+ domain?: string | null | undefined;
111
123
  slug?: string | undefined;
112
124
  }>;
113
125
  export type UpdateOrganizationRequest = z.infer<typeof updateOrganizationSchema>;
@@ -136,6 +148,7 @@ export declare const listOrganizationsResponseSchema: z.ZodObject<{
136
148
  name: z.ZodString;
137
149
  slug: z.ZodString;
138
150
  type: z.ZodEnum<["personal", "organization"]>;
151
+ domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
152
  role: z.ZodEnum<["owner", "admin", "member"]>;
140
153
  memberCount: z.ZodNumber;
141
154
  createdAt: z.ZodString;
@@ -147,6 +160,7 @@ export declare const listOrganizationsResponseSchema: z.ZodObject<{
147
160
  createdAt: string;
148
161
  slug: string;
149
162
  memberCount: number;
163
+ domain?: string | null | undefined;
150
164
  }, {
151
165
  role: "owner" | "admin" | "member";
152
166
  name: string;
@@ -155,6 +169,7 @@ export declare const listOrganizationsResponseSchema: z.ZodObject<{
155
169
  createdAt: string;
156
170
  slug: string;
157
171
  memberCount: number;
172
+ domain?: string | null | undefined;
158
173
  }>, "many">;
159
174
  }, "strip", z.ZodTypeAny, {
160
175
  organizations: {
@@ -165,6 +180,7 @@ export declare const listOrganizationsResponseSchema: z.ZodObject<{
165
180
  createdAt: string;
166
181
  slug: string;
167
182
  memberCount: number;
183
+ domain?: string | null | undefined;
168
184
  }[];
169
185
  }, {
170
186
  organizations: {
@@ -175,6 +191,7 @@ export declare const listOrganizationsResponseSchema: z.ZodObject<{
175
191
  createdAt: string;
176
192
  slug: string;
177
193
  memberCount: number;
194
+ domain?: string | null | undefined;
178
195
  }[];
179
196
  }>;
180
197
  export type ListOrganizationsResponse = z.infer<typeof listOrganizationsResponseSchema>;
@@ -1 +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,GAAG,CAAC,CAAC,KAAK,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AK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAIL,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/dist/pearl.d.ts CHANGED
@@ -44,8 +44,8 @@ export declare const PearlRequestSchema: z.ZodObject<{
44
44
  }>, "many">>>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b";
47
- userRequest: string;
48
47
  userName: string;
48
+ userRequest: string;
49
49
  conversationHistory: {
50
50
  role: "user" | "assistant" | "tool";
51
51
  content: string;
@@ -61,8 +61,8 @@ export declare const PearlRequestSchema: z.ZodObject<{
61
61
  currentCode?: string | undefined;
62
62
  additionalContext?: string | undefined;
63
63
  }, {
64
- userRequest: string;
65
64
  userName: string;
65
+ userRequest: string;
66
66
  availableVariables: any[];
67
67
  model?: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | undefined;
68
68
  currentCode?: string | undefined;
@@ -62,6 +62,7 @@ export declare const usageSchema: z.ZodObject<{
62
62
  totalCost: number;
63
63
  subService?: string | undefined;
64
64
  }>, "many">;
65
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
65
66
  }, "strip", z.ZodTypeAny, {
66
67
  serviceUsage: {
67
68
  service: import("./types").CredentialType;
@@ -78,6 +79,7 @@ export declare const usageSchema: z.ZodObject<{
78
79
  totalTokens: number;
79
80
  modelName?: string | undefined;
80
81
  }[];
82
+ estimatedMonthlyCost?: number | undefined;
81
83
  }, {
82
84
  serviceUsage: {
83
85
  service: import("./types").CredentialType;
@@ -94,6 +96,7 @@ export declare const usageSchema: z.ZodObject<{
94
96
  totalTokens: number;
95
97
  modelName?: string | undefined;
96
98
  }[];
99
+ estimatedMonthlyCost?: number | undefined;
97
100
  }>;
98
101
  export type Usage = z.infer<typeof usageSchema>;
99
102
  /**
@@ -254,10 +257,10 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
254
257
  totalTokens: number;
255
258
  modelName?: string | undefined;
256
259
  }[];
260
+ estimatedMonthlyCost: number;
257
261
  executionLimit: number;
258
262
  creditLimit: number;
259
263
  activeFlowLimit: number;
260
- estimatedMonthlyCost: number;
261
264
  resetDate: string;
262
265
  }, {
263
266
  serviceUsage: {
@@ -275,10 +278,10 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
275
278
  totalTokens: number;
276
279
  modelName?: string | undefined;
277
280
  }[];
281
+ estimatedMonthlyCost: number;
278
282
  executionLimit: number;
279
283
  creditLimit: number;
280
284
  activeFlowLimit: number;
281
- estimatedMonthlyCost: number;
282
285
  resetDate: string;
283
286
  }>;
284
287
  personalUsage: z.ZodOptional<z.ZodObject<{
@@ -321,6 +324,7 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
321
324
  totalCost: number;
322
325
  subService?: string | undefined;
323
326
  }>, "many">;
327
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
324
328
  }, "strip", z.ZodTypeAny, {
325
329
  serviceUsage: {
326
330
  service: import("./types").CredentialType;
@@ -337,6 +341,7 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
337
341
  totalTokens: number;
338
342
  modelName?: string | undefined;
339
343
  }[];
344
+ estimatedMonthlyCost?: number | undefined;
340
345
  }, {
341
346
  serviceUsage: {
342
347
  service: import("./types").CredentialType;
@@ -353,6 +358,7 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
353
358
  totalTokens: number;
354
359
  modelName?: string | undefined;
355
360
  }[];
361
+ estimatedMonthlyCost?: number | undefined;
356
362
  }>>;
357
363
  isActive: z.ZodBoolean;
358
364
  hackathonOffer: z.ZodOptional<z.ZodObject<{
@@ -398,10 +404,10 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
398
404
  totalTokens: number;
399
405
  modelName?: string | undefined;
400
406
  }[];
407
+ estimatedMonthlyCost: number;
401
408
  executionLimit: number;
402
409
  creditLimit: number;
403
410
  activeFlowLimit: number;
404
- estimatedMonthlyCost: number;
405
411
  resetDate: string;
406
412
  };
407
413
  userId: string;
@@ -432,6 +438,7 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
432
438
  totalTokens: number;
433
439
  modelName?: string | undefined;
434
440
  }[];
441
+ estimatedMonthlyCost?: number | undefined;
435
442
  } | undefined;
436
443
  hackathonOffer?: {
437
444
  isActive: boolean;
@@ -460,10 +467,10 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
460
467
  totalTokens: number;
461
468
  modelName?: string | undefined;
462
469
  }[];
470
+ estimatedMonthlyCost: number;
463
471
  executionLimit: number;
464
472
  creditLimit: number;
465
473
  activeFlowLimit: number;
466
- estimatedMonthlyCost: number;
467
474
  resetDate: string;
468
475
  };
469
476
  userId: string;
@@ -494,6 +501,7 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
494
501
  totalTokens: number;
495
502
  modelName?: string | undefined;
496
503
  }[];
504
+ estimatedMonthlyCost?: number | undefined;
497
505
  } | undefined;
498
506
  hackathonOffer?: {
499
507
  isActive: boolean;
@@ -507,4 +515,108 @@ export declare const subscriptionStatusResponseSchema: z.ZodObject<{
507
515
  } | undefined;
508
516
  }>;
509
517
  export type SubscriptionStatusResponse = z.infer<typeof subscriptionStatusResponseSchema>;
518
+ /**
519
+ * User usage item in org usage breakdown (admin/owner only endpoint)
520
+ */
521
+ export declare const userUsageItemSchema: z.ZodObject<{
522
+ userId: z.ZodString;
523
+ userName: z.ZodOptional<z.ZodString>;
524
+ userEmail: z.ZodOptional<z.ZodString>;
525
+ userImageUrl: z.ZodOptional<z.ZodString>;
526
+ role: z.ZodEnum<["owner", "admin", "member"]>;
527
+ executionCount: z.ZodNumber;
528
+ totalCost: z.ZodNumber;
529
+ }, "strip", z.ZodTypeAny, {
530
+ role: "owner" | "admin" | "member";
531
+ totalCost: number;
532
+ userId: string;
533
+ executionCount: number;
534
+ userName?: string | undefined;
535
+ userEmail?: string | undefined;
536
+ userImageUrl?: string | undefined;
537
+ }, {
538
+ role: "owner" | "admin" | "member";
539
+ totalCost: number;
540
+ userId: string;
541
+ executionCount: number;
542
+ userName?: string | undefined;
543
+ userEmail?: string | undefined;
544
+ userImageUrl?: string | undefined;
545
+ }>;
546
+ export type UserUsageItem = z.infer<typeof userUsageItemSchema>;
547
+ /**
548
+ * Organization usage breakdown response (admin/owner only)
549
+ * Response from GET /subscription/org-usage
550
+ */
551
+ export declare const orgUsageBreakdownResponseSchema: z.ZodObject<{
552
+ organizationId: z.ZodNumber;
553
+ organizationName: z.ZodOptional<z.ZodString>;
554
+ monthYear: z.ZodString;
555
+ totalOrgCost: z.ZodNumber;
556
+ totalOrgExecutions: z.ZodNumber;
557
+ users: z.ZodArray<z.ZodObject<{
558
+ userId: z.ZodString;
559
+ userName: z.ZodOptional<z.ZodString>;
560
+ userEmail: z.ZodOptional<z.ZodString>;
561
+ userImageUrl: z.ZodOptional<z.ZodString>;
562
+ role: z.ZodEnum<["owner", "admin", "member"]>;
563
+ executionCount: z.ZodNumber;
564
+ totalCost: z.ZodNumber;
565
+ }, "strip", z.ZodTypeAny, {
566
+ role: "owner" | "admin" | "member";
567
+ totalCost: number;
568
+ userId: string;
569
+ executionCount: number;
570
+ userName?: string | undefined;
571
+ userEmail?: string | undefined;
572
+ userImageUrl?: string | undefined;
573
+ }, {
574
+ role: "owner" | "admin" | "member";
575
+ totalCost: number;
576
+ userId: string;
577
+ executionCount: number;
578
+ userName?: string | undefined;
579
+ userEmail?: string | undefined;
580
+ userImageUrl?: string | undefined;
581
+ }>, "many">;
582
+ }, "strip", z.ZodTypeAny, {
583
+ organizationId: number;
584
+ users: {
585
+ role: "owner" | "admin" | "member";
586
+ totalCost: number;
587
+ userId: string;
588
+ executionCount: number;
589
+ userName?: string | undefined;
590
+ userEmail?: string | undefined;
591
+ userImageUrl?: string | undefined;
592
+ }[];
593
+ monthYear: string;
594
+ totalOrgCost: number;
595
+ totalOrgExecutions: number;
596
+ organizationName?: string | undefined;
597
+ }, {
598
+ organizationId: number;
599
+ users: {
600
+ role: "owner" | "admin" | "member";
601
+ totalCost: number;
602
+ userId: string;
603
+ executionCount: number;
604
+ userName?: string | undefined;
605
+ userEmail?: string | undefined;
606
+ userImageUrl?: string | undefined;
607
+ }[];
608
+ monthYear: string;
609
+ totalOrgCost: number;
610
+ totalOrgExecutions: number;
611
+ organizationName?: string | undefined;
612
+ }>;
613
+ export type OrgUsageBreakdownResponse = z.infer<typeof orgUsageBreakdownResponseSchema>;
614
+ /**
615
+ * Helper to check if user is admin or owner in their org
616
+ */
617
+ export declare function isAdminOrOwner(subscription: SubscriptionStatusResponse): boolean;
618
+ /**
619
+ * Helper to check if user is a regular member
620
+ */
621
+ export declare function isMember(subscription: SubscriptionStatusResponse): boolean;
510
622
  //# sourceMappingURL=subscription-status-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-status-schema.d.ts","sourceRoot":"","sources":["../src/subscription-status-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAQtC;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAmBL,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaL,CAAC;AAEpB,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAsBL,CAAC;AAElC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAO5E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAeL,CAAC;AAE7B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAgBL,CAAC;AAE3B,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,eAAO,MAAM,yBAAyB;;;;;;EAOL,CAAC;AAElC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAeL,CAAC;AAEnC,MAAM,MAAM,oBAAoB,GAAG,CAAC,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AAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BL,CAAC;AAExC,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AAMF;;GAEG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,0BAA0B,GACvC,OAAO,CAGT;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,YAAY,EAAE,0BAA0B,GAAG,OAAO,CAG1E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblelab/shared-schemas",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",