@buildbase/sdk 0.0.13 → 0.0.14

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/index.d.ts CHANGED
@@ -27,6 +27,12 @@ interface ISubscription {
27
27
  cancelAtPeriodEnd: boolean;
28
28
  createdAt: string;
29
29
  updatedAt: string;
30
+ plan?: {
31
+ _id: string;
32
+ name: string;
33
+ slug: string;
34
+ description?: string;
35
+ };
30
36
  }
31
37
  interface ISubscriptionItem {
32
38
  _id: string;
@@ -209,6 +215,7 @@ type InvoiceStatus = 'draft' | 'open' | 'paid' | 'uncollectible' | 'void';
209
215
  interface IInvoice {
210
216
  id: string;
211
217
  amount_due: number;
218
+ number: string | null;
212
219
  amount_paid: number;
213
220
  currency: string;
214
221
  status: InvoiceStatus;
@@ -238,6 +245,7 @@ interface IWorkspace {
238
245
  roles: string[];
239
246
  createdBy: string | IUser;
240
247
  features: Record<string, boolean>;
248
+ subscription?: ISubscription | null;
241
249
  }
242
250
  interface IWorkspaceFeature {
243
251
  _id: string;
@@ -688,6 +696,8 @@ declare const WhenUserFeatureEnabled: (props: IProps) => react.ReactNode;
688
696
  */
689
697
  declare const WhenUserFeatureDisabled: (props: IProps) => react.ReactNode;
690
698
 
699
+ type WorkspaceSettingsSection = 'profile' | 'general' | 'users' | 'subscription' | 'features' | 'danger';
700
+
691
701
  /**
692
702
  * Main authentication hook for the SDK.
693
703
  * Provides authentication state, user session, and auth actions.
@@ -752,7 +762,7 @@ declare const WhenUserFeatureDisabled: (props: IProps) => react.ReactNode;
752
762
  declare function useSaaSAuth(): {
753
763
  signIn: () => Promise<void>;
754
764
  signOut: () => Promise<void>;
755
- openWorkspaceSettings: (section?: "profile" | "general" | "users" | "features" | "danger") => void;
765
+ openWorkspaceSettings: (section?: WorkspaceSettingsSection) => void;
756
766
  isAuthenticated: boolean;
757
767
  isLoading: boolean;
758
768
  isRedirecting: boolean;