@schematichq/schematic-vue 0.1.0 → 1.4.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.
@@ -1,5 +1,6 @@
1
1
  import { App } from 'vue';
2
2
  import { CheckFlagReturn } from '@schematichq/schematic-js';
3
+ import { CheckPlanReturn } from '@schematichq/schematic-js';
3
4
  import { ComputedRef } from 'vue';
4
5
  import { Event as Event_2 } from '@schematichq/schematic-js';
5
6
  import { EventBody } from '@schematichq/schematic-js';
@@ -21,6 +22,8 @@ declare type BaseSchematicPluginOptions = Omit<SchematicJS.SchematicOptions, "cl
21
22
 
22
23
  export { CheckFlagReturn }
23
24
 
25
+ export { CheckPlanReturn }
26
+
24
27
  export { Event_2 as Event }
25
28
 
26
29
  export { EventBody }
@@ -142,6 +145,7 @@ export declare const useSchematicEntitlement: (key: string, opts?: UseSchematicF
142
145
  check: ComputedRef< {
143
146
  featureUsageExceeded?: boolean | undefined;
144
147
  companyId?: string | undefined;
148
+ creditRemaining?: number | undefined;
145
149
  error?: string | undefined;
146
150
  featureAllocation?: number | undefined;
147
151
  featureUsage?: number | undefined;
@@ -153,6 +157,7 @@ export declare const useSchematicEntitlement: (key: string, opts?: UseSchematicF
153
157
  reason: string;
154
158
  ruleId?: string | undefined;
155
159
  ruleType?: SchematicJS.RuleType | undefined;
160
+ softLimit?: number | undefined;
156
161
  userId?: string | undefined;
157
162
  value: boolean;
158
163
  }>;
@@ -236,4 +241,25 @@ export declare type UseSchematicFlagOpts = SchematicComposableOpts & {
236
241
  */
237
242
  export declare const useSchematicIsPending: (opts?: SchematicComposableOpts) => Ref<boolean>;
238
243
 
244
+ /**
245
+ * Get the current plan for the identified company
246
+ * Returns a reactive ref that updates when the plan changes
247
+ *
248
+ * @param opts - Optional configuration including fallback value
249
+ * @returns Ref<SchematicJS.CheckPlanReturn | undefined> - Reactive plan data
250
+ *
251
+ * @example
252
+ * ```typescript
253
+ * const plan = useSchematicPlan()
254
+ *
255
+ * // In template
256
+ * <div v-if="plan">Current plan: {{ plan.name }}</div>
257
+ * ```
258
+ */
259
+ export declare const useSchematicPlan: (opts?: UseSchematicPlanOpts) => Ref<SchematicJS.CheckPlanReturn | undefined>;
260
+
261
+ export declare type UseSchematicPlanOpts = SchematicComposableOpts & {
262
+ fallback?: SchematicJS.CheckPlanReturn;
263
+ };
264
+
239
265
  export { }