@forklaunch/implementation-billing-stripe 1.0.1 → 1.1.1
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.
|
@@ -37,7 +37,7 @@ export class StripeWebhookService<
|
|
|
37
37
|
SubscriptionEntities extends
|
|
38
38
|
StripeSubscriptionEntities<PartyEnum> = StripeSubscriptionEntities<PartyEnum>
|
|
39
39
|
> {
|
|
40
|
-
protected readonly
|
|
40
|
+
protected readonly partyEnum: PartyEnum;
|
|
41
41
|
protected readonly stripeClient: Stripe;
|
|
42
42
|
protected readonly em: EntityManager;
|
|
43
43
|
protected readonly schemaValidator: SchemaValidator;
|
|
@@ -91,9 +91,9 @@ export class StripeWebhookService<
|
|
|
91
91
|
PartyEnum,
|
|
92
92
|
SubscriptionEntities
|
|
93
93
|
>,
|
|
94
|
-
|
|
94
|
+
partyEnum: PartyEnum
|
|
95
95
|
) {
|
|
96
|
-
this.
|
|
96
|
+
this.partyEnum = partyEnum;
|
|
97
97
|
this.stripeClient = stripeClient;
|
|
98
98
|
this.em = em;
|
|
99
99
|
this.schemaValidator = schemaValidator;
|
|
@@ -105,6 +105,21 @@ export class StripeWebhookService<
|
|
|
105
105
|
this.subscriptionService = subscriptionService;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Resolve the party type for a subscription event.
|
|
110
|
+
* Stripe subscriptions are customer-scoped — customers map to users
|
|
111
|
+
* by default. Override this method to implement organization-level
|
|
112
|
+
* subscriptions or other party resolution logic.
|
|
113
|
+
*/
|
|
114
|
+
protected resolvePartyType(_event: Stripe.Event): PartyEnum[keyof PartyEnum] {
|
|
115
|
+
// Default: first value in the enum container.
|
|
116
|
+
// Subclasses can override to inspect event metadata for party type.
|
|
117
|
+
const keys = Object.keys(this.partyEnum as Record<string, unknown>);
|
|
118
|
+
return (this.partyEnum as Record<string, PartyEnum[keyof PartyEnum]>)[
|
|
119
|
+
keys[0]
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
|
|
108
123
|
/**
|
|
109
124
|
* Extract features from Stripe product metadata.
|
|
110
125
|
* Features can be stored as:
|
|
@@ -379,7 +394,7 @@ export class StripeWebhookService<
|
|
|
379
394
|
typeof event.data.object.customer === 'string'
|
|
380
395
|
? event.data.object.customer
|
|
381
396
|
: event.data.object.customer.id,
|
|
382
|
-
partyType: this.
|
|
397
|
+
partyType: this.resolvePartyType(event),
|
|
383
398
|
description: event.data.object.description ?? undefined,
|
|
384
399
|
active: true,
|
|
385
400
|
productId: event.data.object.items.data[0].plan.id,
|
|
@@ -412,7 +427,7 @@ export class StripeWebhookService<
|
|
|
412
427
|
typeof event.data.object.customer === 'string'
|
|
413
428
|
? event.data.object.customer
|
|
414
429
|
: event.data.object.customer.id,
|
|
415
|
-
partyType: this.
|
|
430
|
+
partyType: this.resolvePartyType(event),
|
|
416
431
|
description: event.data.object.description ?? undefined,
|
|
417
432
|
active: true,
|
|
418
433
|
externalId: event.data.object.id,
|
package/lib/services/index.d.mts
CHANGED
|
@@ -159,7 +159,7 @@ declare class StripeSubscriptionService<SchemaValidator extends AnySchemaValidat
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
declare class StripeWebhookService<SchemaValidator extends AnySchemaValidator, StatusEnum, PartyEnum, BillingPortalEntities extends StripeBillingPortalEntities = StripeBillingPortalEntities, CheckoutSessionEntities extends StripeCheckoutSessionEntities<StatusEnum> = StripeCheckoutSessionEntities<StatusEnum>, PaymentLinkEntities extends StripePaymentLinkEntities<StatusEnum> = StripePaymentLinkEntities<StatusEnum>, PlanEntities extends StripePlanEntities = StripePlanEntities, SubscriptionEntities extends StripeSubscriptionEntities<PartyEnum> = StripeSubscriptionEntities<PartyEnum>> {
|
|
162
|
-
protected readonly
|
|
162
|
+
protected readonly partyEnum: PartyEnum;
|
|
163
163
|
protected readonly stripeClient: Stripe__default;
|
|
164
164
|
protected readonly em: EntityManager;
|
|
165
165
|
protected readonly schemaValidator: SchemaValidator;
|
|
@@ -169,7 +169,14 @@ declare class StripeWebhookService<SchemaValidator extends AnySchemaValidator, S
|
|
|
169
169
|
protected readonly paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>;
|
|
170
170
|
protected readonly planService: StripePlanService<SchemaValidator, PlanEntities>;
|
|
171
171
|
protected readonly subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>;
|
|
172
|
-
constructor(stripeClient: Stripe__default, em: EntityManager, schemaValidator: SchemaValidator, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, billingPortalService: StripeBillingPortalService<SchemaValidator, BillingPortalEntities>, checkoutSessionService: StripeCheckoutSessionService<SchemaValidator, StatusEnum, CheckoutSessionEntities>, paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>, planService: StripePlanService<SchemaValidator, PlanEntities>, subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>,
|
|
172
|
+
constructor(stripeClient: Stripe__default, em: EntityManager, schemaValidator: SchemaValidator, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, billingPortalService: StripeBillingPortalService<SchemaValidator, BillingPortalEntities>, checkoutSessionService: StripeCheckoutSessionService<SchemaValidator, StatusEnum, CheckoutSessionEntities>, paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>, planService: StripePlanService<SchemaValidator, PlanEntities>, subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>, partyEnum: PartyEnum);
|
|
173
|
+
/**
|
|
174
|
+
* Resolve the party type for a subscription event.
|
|
175
|
+
* Stripe subscriptions are customer-scoped — customers map to users
|
|
176
|
+
* by default. Override this method to implement organization-level
|
|
177
|
+
* subscriptions or other party resolution logic.
|
|
178
|
+
*/
|
|
179
|
+
protected resolvePartyType(_event: Stripe__default.Event): PartyEnum[keyof PartyEnum];
|
|
173
180
|
/**
|
|
174
181
|
* Extract features from Stripe product metadata.
|
|
175
182
|
* Features can be stored as:
|
package/lib/services/index.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ declare class StripeSubscriptionService<SchemaValidator extends AnySchemaValidat
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
declare class StripeWebhookService<SchemaValidator extends AnySchemaValidator, StatusEnum, PartyEnum, BillingPortalEntities extends StripeBillingPortalEntities = StripeBillingPortalEntities, CheckoutSessionEntities extends StripeCheckoutSessionEntities<StatusEnum> = StripeCheckoutSessionEntities<StatusEnum>, PaymentLinkEntities extends StripePaymentLinkEntities<StatusEnum> = StripePaymentLinkEntities<StatusEnum>, PlanEntities extends StripePlanEntities = StripePlanEntities, SubscriptionEntities extends StripeSubscriptionEntities<PartyEnum> = StripeSubscriptionEntities<PartyEnum>> {
|
|
162
|
-
protected readonly
|
|
162
|
+
protected readonly partyEnum: PartyEnum;
|
|
163
163
|
protected readonly stripeClient: Stripe__default;
|
|
164
164
|
protected readonly em: EntityManager;
|
|
165
165
|
protected readonly schemaValidator: SchemaValidator;
|
|
@@ -169,7 +169,14 @@ declare class StripeWebhookService<SchemaValidator extends AnySchemaValidator, S
|
|
|
169
169
|
protected readonly paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>;
|
|
170
170
|
protected readonly planService: StripePlanService<SchemaValidator, PlanEntities>;
|
|
171
171
|
protected readonly subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>;
|
|
172
|
-
constructor(stripeClient: Stripe__default, em: EntityManager, schemaValidator: SchemaValidator, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, billingPortalService: StripeBillingPortalService<SchemaValidator, BillingPortalEntities>, checkoutSessionService: StripeCheckoutSessionService<SchemaValidator, StatusEnum, CheckoutSessionEntities>, paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>, planService: StripePlanService<SchemaValidator, PlanEntities>, subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>,
|
|
172
|
+
constructor(stripeClient: Stripe__default, em: EntityManager, schemaValidator: SchemaValidator, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, billingPortalService: StripeBillingPortalService<SchemaValidator, BillingPortalEntities>, checkoutSessionService: StripeCheckoutSessionService<SchemaValidator, StatusEnum, CheckoutSessionEntities>, paymentLinkService: StripePaymentLinkService<SchemaValidator, StatusEnum, PaymentLinkEntities>, planService: StripePlanService<SchemaValidator, PlanEntities>, subscriptionService: StripeSubscriptionService<SchemaValidator, PartyEnum, SubscriptionEntities>, partyEnum: PartyEnum);
|
|
173
|
+
/**
|
|
174
|
+
* Resolve the party type for a subscription event.
|
|
175
|
+
* Stripe subscriptions are customer-scoped — customers map to users
|
|
176
|
+
* by default. Override this method to implement organization-level
|
|
177
|
+
* subscriptions or other party resolution logic.
|
|
178
|
+
*/
|
|
179
|
+
protected resolvePartyType(_event: Stripe__default.Event): PartyEnum[keyof PartyEnum];
|
|
173
180
|
/**
|
|
174
181
|
* Extract features from Stripe product metadata.
|
|
175
182
|
* Features can be stored as:
|
package/lib/services/index.js
CHANGED
|
@@ -622,7 +622,7 @@ var BillingPortal = (0, import_persistence.defineComplianceEntity)({
|
|
|
622
622
|
properties: {
|
|
623
623
|
id: import_persistence.fp.string().primary().compliance("none"),
|
|
624
624
|
customerId: import_persistence.fp.string().compliance("none"),
|
|
625
|
-
providerFields: import_persistence.fp.json().compliance("
|
|
625
|
+
providerFields: import_persistence.fp.json().compliance("pci")
|
|
626
626
|
}
|
|
627
627
|
});
|
|
628
628
|
var CheckoutSession = (0, import_persistence.defineComplianceEntity)({
|
|
@@ -633,7 +633,7 @@ var CheckoutSession = (0, import_persistence.defineComplianceEntity)({
|
|
|
633
633
|
paymentMethods: import_persistence.fp.enum().array().compliance("none"),
|
|
634
634
|
currency: import_persistence.fp.enum().compliance("none"),
|
|
635
635
|
status: import_persistence.fp.enum().compliance("none"),
|
|
636
|
-
providerFields: import_persistence.fp.json().compliance("
|
|
636
|
+
providerFields: import_persistence.fp.json().compliance("pci")
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
var PaymentLink = (0, import_persistence.defineComplianceEntity)({
|
|
@@ -644,7 +644,7 @@ var PaymentLink = (0, import_persistence.defineComplianceEntity)({
|
|
|
644
644
|
paymentMethods: import_persistence.fp.enum().array().compliance("none"),
|
|
645
645
|
currency: import_persistence.fp.enum().compliance("none"),
|
|
646
646
|
status: import_persistence.fp.enum().compliance("none"),
|
|
647
|
-
providerFields: import_persistence.fp.json().compliance("
|
|
647
|
+
providerFields: import_persistence.fp.json().compliance("pci")
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
650
|
var Plan = (0, import_persistence.defineComplianceEntity)({
|
|
@@ -657,7 +657,7 @@ var Plan = (0, import_persistence.defineComplianceEntity)({
|
|
|
657
657
|
cadence: import_persistence.fp.enum().compliance("none"),
|
|
658
658
|
currency: import_persistence.fp.enum().compliance("none"),
|
|
659
659
|
billingProvider: import_persistence.fp.enum().compliance("none"),
|
|
660
|
-
providerFields: import_persistence.fp.json().compliance("
|
|
660
|
+
providerFields: import_persistence.fp.json().compliance("pci")
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
663
|
var Subscription = (0, import_persistence.defineComplianceEntity)({
|
|
@@ -669,7 +669,7 @@ var Subscription = (0, import_persistence.defineComplianceEntity)({
|
|
|
669
669
|
partyType: import_persistence.fp.enum().compliance("none"),
|
|
670
670
|
billingProvider: import_persistence.fp.enum().compliance("none"),
|
|
671
671
|
active: import_persistence.fp.boolean().compliance("none"),
|
|
672
|
-
providerFields: import_persistence.fp.json().compliance("
|
|
672
|
+
providerFields: import_persistence.fp.json().compliance("pci")
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
675
|
var StripeWebhookEvent = (0, import_persistence.defineComplianceEntity)({
|
|
@@ -681,7 +681,7 @@ var StripeWebhookEvent = (0, import_persistence.defineComplianceEntity)({
|
|
|
681
681
|
stripeId: import_persistence.fp.string().compliance("none"),
|
|
682
682
|
idempotencyKey: import_persistence.fp.string().nullable().compliance("none"),
|
|
683
683
|
eventType: import_persistence.fp.string().compliance("none"),
|
|
684
|
-
eventData: import_persistence.fp.json().compliance("
|
|
684
|
+
eventData: import_persistence.fp.json().compliance("pci")
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
687
|
|
|
@@ -692,7 +692,7 @@ var BillingProviderEnum = {
|
|
|
692
692
|
|
|
693
693
|
// services/webhook.service.ts
|
|
694
694
|
var StripeWebhookService = class {
|
|
695
|
-
|
|
695
|
+
partyEnum;
|
|
696
696
|
stripeClient;
|
|
697
697
|
em;
|
|
698
698
|
schemaValidator;
|
|
@@ -702,8 +702,8 @@ var StripeWebhookService = class {
|
|
|
702
702
|
paymentLinkService;
|
|
703
703
|
planService;
|
|
704
704
|
subscriptionService;
|
|
705
|
-
constructor(stripeClient, em, schemaValidator, openTelemetryCollector, billingPortalService, checkoutSessionService, paymentLinkService, planService, subscriptionService,
|
|
706
|
-
this.
|
|
705
|
+
constructor(stripeClient, em, schemaValidator, openTelemetryCollector, billingPortalService, checkoutSessionService, paymentLinkService, planService, subscriptionService, partyEnum) {
|
|
706
|
+
this.partyEnum = partyEnum;
|
|
707
707
|
this.stripeClient = stripeClient;
|
|
708
708
|
this.em = em;
|
|
709
709
|
this.schemaValidator = schemaValidator;
|
|
@@ -714,6 +714,16 @@ var StripeWebhookService = class {
|
|
|
714
714
|
this.planService = planService;
|
|
715
715
|
this.subscriptionService = subscriptionService;
|
|
716
716
|
}
|
|
717
|
+
/**
|
|
718
|
+
* Resolve the party type for a subscription event.
|
|
719
|
+
* Stripe subscriptions are customer-scoped — customers map to users
|
|
720
|
+
* by default. Override this method to implement organization-level
|
|
721
|
+
* subscriptions or other party resolution logic.
|
|
722
|
+
*/
|
|
723
|
+
resolvePartyType(_event) {
|
|
724
|
+
const keys = Object.keys(this.partyEnum);
|
|
725
|
+
return this.partyEnum[keys[0]];
|
|
726
|
+
}
|
|
717
727
|
/**
|
|
718
728
|
* Extract features from Stripe product metadata.
|
|
719
729
|
* Features can be stored as:
|
|
@@ -922,7 +932,7 @@ var StripeWebhookService = class {
|
|
|
922
932
|
{
|
|
923
933
|
id: event.data.object.id,
|
|
924
934
|
partyId: typeof event.data.object.customer === "string" ? event.data.object.customer : event.data.object.customer.id,
|
|
925
|
-
partyType: this.
|
|
935
|
+
partyType: this.resolvePartyType(event),
|
|
926
936
|
description: event.data.object.description ?? void 0,
|
|
927
937
|
active: true,
|
|
928
938
|
productId: event.data.object.items.data[0].plan.id,
|
|
@@ -945,7 +955,7 @@ var StripeWebhookService = class {
|
|
|
945
955
|
{
|
|
946
956
|
id: event.data.object.id,
|
|
947
957
|
partyId: typeof event.data.object.customer === "string" ? event.data.object.customer : event.data.object.customer.id,
|
|
948
|
-
partyType: this.
|
|
958
|
+
partyType: this.resolvePartyType(event),
|
|
949
959
|
description: event.data.object.description ?? void 0,
|
|
950
960
|
active: true,
|
|
951
961
|
externalId: event.data.object.id,
|
package/lib/services/index.mjs
CHANGED
|
@@ -590,7 +590,7 @@ var BillingPortal = defineComplianceEntity({
|
|
|
590
590
|
properties: {
|
|
591
591
|
id: fp.string().primary().compliance("none"),
|
|
592
592
|
customerId: fp.string().compliance("none"),
|
|
593
|
-
providerFields: fp.json().compliance("
|
|
593
|
+
providerFields: fp.json().compliance("pci")
|
|
594
594
|
}
|
|
595
595
|
});
|
|
596
596
|
var CheckoutSession = defineComplianceEntity({
|
|
@@ -601,7 +601,7 @@ var CheckoutSession = defineComplianceEntity({
|
|
|
601
601
|
paymentMethods: fp.enum().array().compliance("none"),
|
|
602
602
|
currency: fp.enum().compliance("none"),
|
|
603
603
|
status: fp.enum().compliance("none"),
|
|
604
|
-
providerFields: fp.json().compliance("
|
|
604
|
+
providerFields: fp.json().compliance("pci")
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
607
|
var PaymentLink = defineComplianceEntity({
|
|
@@ -612,7 +612,7 @@ var PaymentLink = defineComplianceEntity({
|
|
|
612
612
|
paymentMethods: fp.enum().array().compliance("none"),
|
|
613
613
|
currency: fp.enum().compliance("none"),
|
|
614
614
|
status: fp.enum().compliance("none"),
|
|
615
|
-
providerFields: fp.json().compliance("
|
|
615
|
+
providerFields: fp.json().compliance("pci")
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
618
|
var Plan = defineComplianceEntity({
|
|
@@ -625,7 +625,7 @@ var Plan = defineComplianceEntity({
|
|
|
625
625
|
cadence: fp.enum().compliance("none"),
|
|
626
626
|
currency: fp.enum().compliance("none"),
|
|
627
627
|
billingProvider: fp.enum().compliance("none"),
|
|
628
|
-
providerFields: fp.json().compliance("
|
|
628
|
+
providerFields: fp.json().compliance("pci")
|
|
629
629
|
}
|
|
630
630
|
});
|
|
631
631
|
var Subscription = defineComplianceEntity({
|
|
@@ -637,7 +637,7 @@ var Subscription = defineComplianceEntity({
|
|
|
637
637
|
partyType: fp.enum().compliance("none"),
|
|
638
638
|
billingProvider: fp.enum().compliance("none"),
|
|
639
639
|
active: fp.boolean().compliance("none"),
|
|
640
|
-
providerFields: fp.json().compliance("
|
|
640
|
+
providerFields: fp.json().compliance("pci")
|
|
641
641
|
}
|
|
642
642
|
});
|
|
643
643
|
var StripeWebhookEvent = defineComplianceEntity({
|
|
@@ -649,7 +649,7 @@ var StripeWebhookEvent = defineComplianceEntity({
|
|
|
649
649
|
stripeId: fp.string().compliance("none"),
|
|
650
650
|
idempotencyKey: fp.string().nullable().compliance("none"),
|
|
651
651
|
eventType: fp.string().compliance("none"),
|
|
652
|
-
eventData: fp.json().compliance("
|
|
652
|
+
eventData: fp.json().compliance("pci")
|
|
653
653
|
}
|
|
654
654
|
});
|
|
655
655
|
|
|
@@ -660,7 +660,7 @@ var BillingProviderEnum = {
|
|
|
660
660
|
|
|
661
661
|
// services/webhook.service.ts
|
|
662
662
|
var StripeWebhookService = class {
|
|
663
|
-
|
|
663
|
+
partyEnum;
|
|
664
664
|
stripeClient;
|
|
665
665
|
em;
|
|
666
666
|
schemaValidator;
|
|
@@ -670,8 +670,8 @@ var StripeWebhookService = class {
|
|
|
670
670
|
paymentLinkService;
|
|
671
671
|
planService;
|
|
672
672
|
subscriptionService;
|
|
673
|
-
constructor(stripeClient, em, schemaValidator, openTelemetryCollector, billingPortalService, checkoutSessionService, paymentLinkService, planService, subscriptionService,
|
|
674
|
-
this.
|
|
673
|
+
constructor(stripeClient, em, schemaValidator, openTelemetryCollector, billingPortalService, checkoutSessionService, paymentLinkService, planService, subscriptionService, partyEnum) {
|
|
674
|
+
this.partyEnum = partyEnum;
|
|
675
675
|
this.stripeClient = stripeClient;
|
|
676
676
|
this.em = em;
|
|
677
677
|
this.schemaValidator = schemaValidator;
|
|
@@ -682,6 +682,16 @@ var StripeWebhookService = class {
|
|
|
682
682
|
this.planService = planService;
|
|
683
683
|
this.subscriptionService = subscriptionService;
|
|
684
684
|
}
|
|
685
|
+
/**
|
|
686
|
+
* Resolve the party type for a subscription event.
|
|
687
|
+
* Stripe subscriptions are customer-scoped — customers map to users
|
|
688
|
+
* by default. Override this method to implement organization-level
|
|
689
|
+
* subscriptions or other party resolution logic.
|
|
690
|
+
*/
|
|
691
|
+
resolvePartyType(_event) {
|
|
692
|
+
const keys = Object.keys(this.partyEnum);
|
|
693
|
+
return this.partyEnum[keys[0]];
|
|
694
|
+
}
|
|
685
695
|
/**
|
|
686
696
|
* Extract features from Stripe product metadata.
|
|
687
697
|
* Features can be stored as:
|
|
@@ -890,7 +900,7 @@ var StripeWebhookService = class {
|
|
|
890
900
|
{
|
|
891
901
|
id: event.data.object.id,
|
|
892
902
|
partyId: typeof event.data.object.customer === "string" ? event.data.object.customer : event.data.object.customer.id,
|
|
893
|
-
partyType: this.
|
|
903
|
+
partyType: this.resolvePartyType(event),
|
|
894
904
|
description: event.data.object.description ?? void 0,
|
|
895
905
|
active: true,
|
|
896
906
|
productId: event.data.object.items.data[0].plan.id,
|
|
@@ -913,7 +923,7 @@ var StripeWebhookService = class {
|
|
|
913
923
|
{
|
|
914
924
|
id: event.data.object.id,
|
|
915
925
|
partyId: typeof event.data.object.customer === "string" ? event.data.object.customer : event.data.object.customer.id,
|
|
916
|
-
partyType: this.
|
|
926
|
+
partyType: this.resolvePartyType(event),
|
|
917
927
|
description: event.data.object.description ?? void 0,
|
|
918
928
|
active: true,
|
|
919
929
|
externalId: event.data.object.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/implementation-billing-stripe",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Stripe implementation for forklaunch billing",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
"lib/**"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@forklaunch/common": "^1.0
|
|
46
|
-
"@forklaunch/core": "^1.0
|
|
47
|
-
"@forklaunch/internal": "^1.0
|
|
48
|
-
"@forklaunch/validator": "^1.0
|
|
45
|
+
"@forklaunch/common": "^1.1.0",
|
|
46
|
+
"@forklaunch/core": "^1.1.0",
|
|
47
|
+
"@forklaunch/internal": "^1.1.0",
|
|
48
|
+
"@forklaunch/validator": "^1.1.0",
|
|
49
49
|
"@mikro-orm/core": "7.0.5",
|
|
50
50
|
"@sinclair/typebox": "^0.34.48",
|
|
51
51
|
"ajv": "^8.18.0",
|
|
52
52
|
"stripe": "^20.4.1",
|
|
53
53
|
"zod": "^4.3.6",
|
|
54
|
-
"@forklaunch/implementation-billing-base": "1.0.
|
|
55
|
-
"@forklaunch/interfaces-billing": "1.0.
|
|
54
|
+
"@forklaunch/implementation-billing-base": "1.0.1",
|
|
55
|
+
"@forklaunch/interfaces-billing": "1.0.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
58
|
+
"@typescript/native-preview": "7.0.0-dev.20260324.1",
|
|
59
59
|
"depcheck": "^1.4.7",
|
|
60
60
|
"prettier": "^3.8.1",
|
|
61
61
|
"typedoc": "^0.28.18"
|