@dotted-labs/ngx-supabase-stripe 0.1.8 → 0.1.9

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.
@@ -10,6 +10,34 @@ export type Database = {
10
10
  [_ in never]: never;
11
11
  };
12
12
  Functions: {
13
+ get_stripe_checkout_session: {
14
+ Args: {
15
+ session_id: string;
16
+ };
17
+ Returns: {
18
+ id: string;
19
+ customer: string;
20
+ payment_intent: string;
21
+ subscription: string;
22
+ attrs: Json;
23
+ }[];
24
+ };
25
+ get_stripe_community_products: {
26
+ Args: {
27
+ p_community_id: string;
28
+ };
29
+ Returns: {
30
+ id: string;
31
+ name: string;
32
+ description: string;
33
+ price: number;
34
+ image_url: string;
35
+ video: string;
36
+ payment_provider_product_id: string;
37
+ created_at: string;
38
+ updated_at: string;
39
+ }[];
40
+ };
13
41
  get_stripe_customer: {
14
42
  Args: {
15
43
  customer_email: string;
@@ -111,15 +139,42 @@ export type Database = {
111
139
  }[];
112
140
  };
113
141
  };
114
- Enums: {
115
- [_ in never]: never;
116
- };
117
142
  CompositeTypes: {
118
143
  [_ in never]: never;
119
144
  };
120
145
  };
121
146
  stripe: {
122
147
  Tables: {
148
+ accounts: {
149
+ Row: {
150
+ attrs: Json | null;
151
+ business_type: string | null;
152
+ country: string | null;
153
+ created: string | null;
154
+ email: string | null;
155
+ id: string | null;
156
+ type: string | null;
157
+ };
158
+ Insert: {
159
+ attrs?: Json | null;
160
+ business_type?: string | null;
161
+ country?: string | null;
162
+ created?: string | null;
163
+ email?: string | null;
164
+ id?: string | null;
165
+ type?: string | null;
166
+ };
167
+ Update: {
168
+ attrs?: Json | null;
169
+ business_type?: string | null;
170
+ country?: string | null;
171
+ created?: string | null;
172
+ email?: string | null;
173
+ id?: string | null;
174
+ type?: string | null;
175
+ };
176
+ Relationships: [];
177
+ };
123
178
  checkout_sessions: {
124
179
  Row: {
125
180
  attrs: Json | null;
@@ -343,13 +398,6 @@ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSc
343
398
  } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
344
399
  Update: infer U;
345
400
  } ? U : never : never;
346
- export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
347
- schema: keyof Database;
348
- }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
349
- schema: keyof Database;
350
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
351
- schema: keyof Database;
352
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
353
401
  export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
354
402
  schema: keyof Database;
355
403
  }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
@@ -357,12 +405,4 @@ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof Defaul
357
405
  } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
358
406
  schema: keyof Database;
359
407
  } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
360
- export declare const Constants: {
361
- readonly public: {
362
- readonly Enums: {};
363
- };
364
- readonly stripe: {
365
- readonly Enums: {};
366
- };
367
- };
368
408
  export {};
@@ -69,13 +69,6 @@ class SupabaseClientService {
69
69
  getClient() {
70
70
  return this.client;
71
71
  }
72
- /**
73
- * Select checkout sessions
74
- * @param query Optional query parameters
75
- */
76
- async selectCheckoutSessions(query) {
77
- return this.select('checkout_sessions', query);
78
- }
79
72
  /**
80
73
  * Select payment intents
81
74
  * @param query Optional query parameters
@@ -83,6 +76,20 @@ class SupabaseClientService {
83
76
  async selectPaymentIntents(query) {
84
77
  return this.select('payment_intents', query);
85
78
  }
79
+ /**
80
+ * STRIPE CHECKOUT SESSIONS
81
+ */
82
+ /**
83
+ * Select checkout sessions
84
+ * @param sessionId The checkout session ID
85
+ */
86
+ async selectCheckoutSession(sessionId) {
87
+ return this.client
88
+ .schema('public')
89
+ .rpc('get_stripe_checkout_session', { session_id: sessionId })
90
+ .select('*')
91
+ .single();
92
+ }
86
93
  /**
87
94
  * STRIPE SUBSCRIPTIONS
88
95
  */
@@ -547,6 +554,27 @@ class StripeClientService {
547
554
  return { url: null, error: error };
548
555
  }
549
556
  }
557
+ /**
558
+ * Create a customer
559
+ * @param customerEmail The email of the customer
560
+ */
561
+ async createCustomer(customerEmail) {
562
+ try {
563
+ const { data, error } = await this.supabase.getClient()
564
+ .functions.invoke('create_customer', {
565
+ body: {
566
+ customerEmail
567
+ }
568
+ });
569
+ if (error) {
570
+ throw error;
571
+ }
572
+ return { customer: data, error: null };
573
+ }
574
+ catch (error) {
575
+ return { customer: null, error: error };
576
+ }
577
+ }
550
578
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StripeClientService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
551
579
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StripeClientService, providedIn: 'root' });
552
580
  }
@@ -907,7 +935,7 @@ const CustomerStore = signalStore({ providedIn: 'root' }, withState(initialCusto
907
935
  firstSubscription: computed(() => state.subscriptions.data()?.[0]),
908
936
  restSubscriptions: computed(() => state.subscriptions.data()?.slice(1)),
909
937
  isError: computed(() => state.paymentIntents.error()),
910
- })), withMethods((state, supabaseService = inject(SupabaseClientService), productsStore = inject(ProductsStore)) => ({
938
+ })), withMethods((state, supabaseService = inject(SupabaseClientService), stripeService = inject(StripeClientService), productsStore = inject(ProductsStore)) => ({
911
939
  /**
912
940
  * Load customer
913
941
  * @param customerEmail The customer email
@@ -926,10 +954,23 @@ const CustomerStore = signalStore({ providedIn: 'root' }, withState(initialCusto
926
954
  patchState(state, { customer: { data: customer, status: 'success', error: null } });
927
955
  }
928
956
  else {
929
- patchState(state, { customer: { data: null, status: 'error', error: 'no customer found' } });
957
+ this.createCustomer(customerEmail);
930
958
  }
931
959
  }
932
960
  },
961
+ /**
962
+ * Create a customer
963
+ * @param customerEmail The customer email
964
+ */
965
+ async createCustomer(customerEmail) {
966
+ const { customer, error } = await stripeService.createCustomer(customerEmail);
967
+ if (error) {
968
+ patchState(state, { customer: { error: error.message, status: 'error', data: null } });
969
+ }
970
+ else {
971
+ patchState(state, { customer: { data: customer, status: 'success', error: null } });
972
+ }
973
+ },
933
974
  /**
934
975
  * Load payment intents
935
976
  * @param customerId The customer ID
@@ -1293,6 +1334,7 @@ class SubscriptionReturnPageComponent {
1293
1334
  router = inject(Router);
1294
1335
  checkoutStore = inject(CheckoutStore);
1295
1336
  subscriptionsStore = inject(SubscriptionsStore);
1337
+ sessionStatus = computed(() => this.checkoutStore.sessionStatus());
1296
1338
  returnUrl = input('/');
1297
1339
  async ngOnInit() {
1298
1340
  this.route.queryParams.subscribe(async (params) => {
@@ -1312,11 +1354,11 @@ class SubscriptionReturnPageComponent {
1312
1354
  this.router.navigateByUrl(this.returnUrl());
1313
1355
  }
1314
1356
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SubscriptionReturnPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1315
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SubscriptionReturnPageComponent, isStandalone: true, selector: "lib-subscription-return-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"max-w-md mx-auto p-4 bg-white rounded-lg shadow-md\">\n <div class=\"text-center mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-16 w-16 text-primary mx-auto mb-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"text-2xl font-bold text-gray-800\">\u00A1Gracias por suscribirte!</h2>\n <p class=\"text-gray-600 mt-2\">Tu suscripci\u00F3n ha sido procesada correctamente.</p>\n </div>\n \n @if (subscriptionsStore.isStatusLoading()) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <p>Cargando detalles de la suscripci\u00F3n...</p>\n </div>\n } @else if (subscriptionsStore.isStatusError()) {\n <div class=\"error-container\">\n <p class=\"text-red-500\">{{ subscriptionsStore.error() }}</p>\n </div>\n } @else if (subscriptionsStore.hasSubscriptions()) {\n <div class=\"success-container\">\n <p class=\"text-green-600 font-medium\">Tu suscripci\u00F3n est\u00E1 activa.</p>\n </div>\n }\n \n <div class=\"mt-6 text-center\">\n <button class=\"btn btn-primary\" (click)=\"navigate()\">\n Volver al inicio\n </button>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1357
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SubscriptionReturnPageComponent, isStandalone: true, selector: "lib-subscription-return-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex justify-center min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-4\">\n <div class=\"hero-content text-center max-w-md\">\n <div class=\"card w-full bg-base-100 shadow-2xl\">\n <div class=\"card-body items-center text-center\">\n <!-- Success Icon -->\n <div class=\"mb-6\">\n <div class=\"avatar\">\n <div class=\"w-24 h-24 rounded-full bg-success/10 flex items-center justify-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-full w-full text-success\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n </div>\n </div>\n\n <!-- Status Content -->\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"flex flex-col items-center gap-4 mb-6\">\n <span class=\"loading loading-spinner loading-lg text-primary\"></span>\n <div class=\"alert alert-info\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" class=\"stroke-current shrink-0 w-6 h-6\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path>\n </svg>\n <span>Cargando detalles de la suscripci\u00F3n...</span>\n </div>\n </div>\n } @else if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span>{{ subscriptionsStore.error() }}</span>\n </div>\n } @else if (checkoutStore.isPaymentComplete()) {\n\n <!-- Title and Description -->\n <h2 class=\"card-title text-3xl font-bold text-base-content mb-2\">{{ sessionStatus()?.amount_total }}</h2>\n\n <div class=\"alert alert-success mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span class=\"font-medium\">Tu suscripci\u00F3n est\u00E1 activa y lista para usar.</span>\n </div>\n\n <div class=\"bg-base-200 rounded-lg p-4 mb-6 w-full\">\n <h3 class=\"font-semibold text-sm text-base-content/80 mb-3\">Beneficios incluidos:</h3>\n <ul class=\"space-y-2\">\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Acceso completo a todas las funciones\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Soporte prioritario 24/7\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Actualizaciones autom\u00E1ticas\n </li>\n </ul>\n </div>\n }\n\n <!-- Action Buttons -->\n <div class=\"card-actions justify-center w-full\">\n <button class=\"btn btn-primary btn-wide\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6\"\n />\n </svg>\n Ir al Panel Principal\n </button>\n </div>\n\n <!-- Additional Help -->\n <div class=\"text-center mt-4\">\n <p class=\"text-xs text-base-content/50\">\n \u00BFNecesitas ayuda?\n <a href=\"#\" class=\"link link-primary\">Contacta soporte</a>\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1316
1358
  }
1317
1359
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SubscriptionReturnPageComponent, decorators: [{
1318
1360
  type: Component,
1319
- args: [{ selector: 'lib-subscription-return-page', standalone: true, imports: [CommonModule], template: "<div class=\"max-w-md mx-auto p-4 bg-white rounded-lg shadow-md\">\n <div class=\"text-center mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-16 w-16 text-primary mx-auto mb-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"text-2xl font-bold text-gray-800\">\u00A1Gracias por suscribirte!</h2>\n <p class=\"text-gray-600 mt-2\">Tu suscripci\u00F3n ha sido procesada correctamente.</p>\n </div>\n \n @if (subscriptionsStore.isStatusLoading()) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <p>Cargando detalles de la suscripci\u00F3n...</p>\n </div>\n } @else if (subscriptionsStore.isStatusError()) {\n <div class=\"error-container\">\n <p class=\"text-red-500\">{{ subscriptionsStore.error() }}</p>\n </div>\n } @else if (subscriptionsStore.hasSubscriptions()) {\n <div class=\"success-container\">\n <p class=\"text-green-600 font-medium\">Tu suscripci\u00F3n est\u00E1 activa.</p>\n </div>\n }\n \n <div class=\"mt-6 text-center\">\n <button class=\"btn btn-primary\" (click)=\"navigate()\">\n Volver al inicio\n </button>\n </div>\n</div>" }]
1361
+ args: [{ selector: 'lib-subscription-return-page', standalone: true, imports: [CommonModule], template: "<div class=\"flex justify-center min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-4\">\n <div class=\"hero-content text-center max-w-md\">\n <div class=\"card w-full bg-base-100 shadow-2xl\">\n <div class=\"card-body items-center text-center\">\n <!-- Success Icon -->\n <div class=\"mb-6\">\n <div class=\"avatar\">\n <div class=\"w-24 h-24 rounded-full bg-success/10 flex items-center justify-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-full w-full text-success\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n </div>\n </div>\n\n <!-- Status Content -->\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"flex flex-col items-center gap-4 mb-6\">\n <span class=\"loading loading-spinner loading-lg text-primary\"></span>\n <div class=\"alert alert-info\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" class=\"stroke-current shrink-0 w-6 h-6\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path>\n </svg>\n <span>Cargando detalles de la suscripci\u00F3n...</span>\n </div>\n </div>\n } @else if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span>{{ subscriptionsStore.error() }}</span>\n </div>\n } @else if (checkoutStore.isPaymentComplete()) {\n\n <!-- Title and Description -->\n <h2 class=\"card-title text-3xl font-bold text-base-content mb-2\">{{ sessionStatus()?.amount_total }}</h2>\n\n <div class=\"alert alert-success mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span class=\"font-medium\">Tu suscripci\u00F3n est\u00E1 activa y lista para usar.</span>\n </div>\n\n <div class=\"bg-base-200 rounded-lg p-4 mb-6 w-full\">\n <h3 class=\"font-semibold text-sm text-base-content/80 mb-3\">Beneficios incluidos:</h3>\n <ul class=\"space-y-2\">\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Acceso completo a todas las funciones\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Soporte prioritario 24/7\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n Actualizaciones autom\u00E1ticas\n </li>\n </ul>\n </div>\n }\n\n <!-- Action Buttons -->\n <div class=\"card-actions justify-center w-full\">\n <button class=\"btn btn-primary btn-wide\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6\"\n />\n </svg>\n Ir al Panel Principal\n </button>\n </div>\n\n <!-- Additional Help -->\n <div class=\"text-center mt-4\">\n <p class=\"text-xs text-base-content/50\">\n \u00BFNecesitas ayuda?\n <a href=\"#\" class=\"link link-primary\">Contacta soporte</a>\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>" }]
1320
1362
  }] });
1321
1363
 
1322
1364
  class SubscriptionItemSkeletonComponent {
@@ -1607,15 +1649,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
1607
1649
  ], template: "<div class=\"container flex flex-col gap-6 mx-auto\">\n <!-- Subscriptions Section -->\n <section class=\"flex flex-col\">\n <lib-subscriptions [returnUrl]=\"returnUrl()\"></lib-subscriptions>\n </section>\n\n <!-- Payment Intents Section with Tabs -->\n <section class=\"flex flex-col\">\n <header class=\"mb-4\">\n <h2 class=\"text-2xl font-bold text-gray-800\">Payment Intents</h2>\n <p class=\"text-gray-600\">Payment intents history. Select a tab to see the list or table view.</p>\n </header>\n\n <div role=\"tablist\" class=\"tabs tabs-box w-fit mb-4\">\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'list'\" (click)=\"setActiveTab('list')\">Lista</a>\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'table'\" (click)=\"setActiveTab('table')\">Tabla</a>\n </div>\n\n @if (activeTab() === 'list') {\n <lib-payment-intents-list\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-list>\n } @else {\n <lib-payment-intents-table\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (exportSelected)=\"exportSelectedPaymentIntents($event)\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-table>\n }\n </section>\n</div>\n" }]
1608
1650
  }] });
1609
1651
 
1610
- const Constants = {
1611
- public: {
1612
- Enums: {},
1613
- },
1614
- stripe: {
1615
- Enums: {},
1616
- },
1617
- };
1618
-
1619
1652
  /*
1620
1653
  * Public API Surface of ngx-supabase-stripe
1621
1654
  */
@@ -1625,5 +1658,5 @@ const Constants = {
1625
1658
  * Generated bundle index. Do not edit.
1626
1659
  */
1627
1660
 
1628
- export { CheckoutStore, Constants, CustomerDashboardComponent, CustomerStore, EmbeddedCheckoutComponent, EmbeddedSubscriptionComponent, PaymentIntentItemComponent, PaymentIntentItemSkeletonComponent, PaymentIntentsListComponent, ProductListComponent, ProductsStore, ReturnPageComponent, STRIPE_CONFIG, SUPABASE_CONFIG, StripeClientService, SubscriptionCardComponent, SubscriptionItemComponent, SubscriptionReturnPageComponent, SubscriptionsListComponent, SubscriptionsStore, SupabaseClientService, parsePaymentIntent, parseProduct, parseSubscription, provideNgxSupabaseStripeConfig, provideStripeConfig, provideSupabaseConfig };
1661
+ export { CheckoutStore, CustomerDashboardComponent, CustomerStore, EmbeddedCheckoutComponent, EmbeddedSubscriptionComponent, PaymentIntentItemComponent, PaymentIntentItemSkeletonComponent, PaymentIntentsListComponent, ProductListComponent, ProductsStore, ReturnPageComponent, STRIPE_CONFIG, SUPABASE_CONFIG, StripeClientService, SubscriptionCardComponent, SubscriptionItemComponent, SubscriptionReturnPageComponent, SubscriptionsListComponent, SubscriptionsStore, SupabaseClientService, parsePaymentIntent, parseProduct, parseSubscription, provideNgxSupabaseStripeConfig, provideStripeConfig, provideSupabaseConfig };
1629
1662
  //# sourceMappingURL=dotted-labs-ngx-supabase-stripe.mjs.map